修订控制程序的制作方法
我目前正在用 PHP 开发一个网站,并使用 MySQL 作为数据库。在这个网站中,我想对用户生成的内容进行修订控制。类似的 Wiki/Stack Exchange 等。
我目前想到的(没有写在纸上或任何东西上)只是有第二个表,其中包含日期、内容和提交更改的用户,但我不太确定是否这是最有效的方法。
另外,最重要的是,如何直观地查看修订版本的更改。例如,某人打开一篇文章,单击“查看更改”,可以看到谁编辑了它以及编辑了哪些内容。正在寻找类似于 SVN 的 diff 程序的东西。
霍什
I am currently developing a website in PHP with a MySQL for databases. In this website, I wanted to make a revision control for the content that will be user generated. Similar Wiki/Stack Exchange etc.
What I currently have in mind (not put down on paper or anything) is just have a second table that contains the date, content and the user who submitted the change, but I'm not quite sure if that is the most efficient way to do this.
Also, on top of that, what is the way to view revision changes visually. e.g. someone opens an article, clicks "view changes" and can see who edited it and what was edited. Looking for something similar to SVN's diff program.
Hosh
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您应该查看 点-及时架构。我无法判断这有多可靠,因为我还没有尝试过,但我认为它会给你一个粗略的想法。
You should look into point-in-time-architecture. I can't tell, how reliable this is as I haven't tried it out yet, but I think it would give you a rough idea.
对于那些关心的人,我想去 http://pear.horde.org/ 并向下滚动到 Horde_Text_Diff (或者在页面上搜索),应该是一个不错的。
For those who care, I think going to http://pear.horde.org/ and scrolling down to Horde_Text_Diff (or search on the page), should be a good one.