如何创建 PHP、MySQL 页面的快照或克隆...需要灵感
我们有一个 Web 应用程序,它创建一个动态 PHP 页面,其中包含用户通过数字表单输入的所有 MySQL 存储详细信息。到目前为止一切顺利,但我们希望存储这些信息以便日后参考,因为管理员可以对数据进行更改,这反映了根据保存的数据计算出的计算结果。
当返回这些保存的数据时,我们需要能够看到为该特定计算提交的所有信息,因此如果该数据发生了变化,我们将看到与该计算相关的内容。现在我们已经考虑过,也许计算完成后的快照、网页的 pdf 或类似的东西都可以,但这简单吗?
我希望这是有道理的......
We have a web application that creates a dynamic PHP page with all the MySQL stored details a user has entered via a number a forms. So far so good, but we want this information stored some how to be refereed to at a later date, as an administrator can make changes to the data, which reflects on calculations that are worked out from this saved data.
When going back over this saved data we need to be able to see all the information submitted for that particular calculation, so if that data has changed we will see what is was relating to that calculation. Now we have thought about maybe a snapshot when the calculation is done, pdf of the webpage or something similar would do, but is this simple to do?
I hope this makes sense...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
嗯,这很难理解。听起来您应该创建一个新的 MySQL 表,其中包含计算快照及其保存时间?
您想要快照什么类型的数据?
Hmm this is quite difficult to understand. Sounds like you should make a new MySQL table containing snapshots of the calculations and the time they were saved?
What kind of data are you looking to snapshot?
您可以使用 PHP 轻松地从网页生成 PDF 文件。许多图书馆都能够做到这一点。
例如 FPDF 或 FPDI(开源项目)。
You can easily generate PDF files from a web page in PHP. Many libraries are able to do this.
Like FPDF or FPDI (opensource projects).
有点左字段答案,但您可以使用 Selenium 和 PHPUnit。 Selenium 可以抓取页面并截图,PHPUnit 可以驱动 Selenium。
http://www.phpunit.de/manual/3.5/en/selenium.html
A bit of a left field answer but you could use Selenium and PHPUnit. Selenium can grab a page and screenshot it, PHPUnit can drive Selenium.
http://www.phpunit.de/manual/3.5/en/selenium.html