在 PHP 中跟踪更改/修订脚本? [英] Track changes / revisions script in PHP?

查看:41
本文介绍了在 PHP 中跟踪更改/修订脚本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个将数据提交到数据库的表单.如果表格中填充了内容,它将在表单的文本区域中显示内容,并使用表格中的相应数据.

I have a form that submits data into a database. If the table is populated with content, it will display the content in the textarea for the form with the appropriate data from the table.

我想这样做,当有人对已经编写的内容提交修订时,您可以跟踪该更改并将其与类似于维基百科历史功能的旧内容(如突出显示)分开.

I want to make it so that when someone submits a revision to what was already written, you can track that change and separate it from the old stuff (like highlighting) similar to Wikipedia's history function.

有谁知道我如何在 PHP 中做到这一点?

Does anyone know how I could do this in PHP?

谢谢!

推荐答案

纯PHP中的差异,您可以使用它来保存不同的修订.所以,保存第一个输入,然后继续保存差异

There is an implementation of diff in pure PHP which you could use to save different revisions. So, save the first input and then keep saving the diffs

这篇关于在 PHP 中跟踪更改/修订脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆