我可以通过 php 构建一些 wiki/google 文档类型编辑器吗???
如果我从零开始编码,谷歌文档/维基似乎很困难 那么,是否有任何类型的 api/插件已经具有 php.ini 的这些代码? 另外,wiki如何处理并行编辑?比如说,一个在另一个更新时更新了内容。后者怎样才能得到最新的信息??? 否则一旦后者提交更新,更新的内容将会被删除。
谢谢
it seems that the google doc/wiki is difficult if i code it from the zero
So, are there any kinds of api/plugin already have those code for php.
Also, how can wiki handle the parallel editing?? Say, one have update the content when the other one is updating. How can the latter one get the most updated information ????
Otherwise the updated content will be erase once the latter one submit update .
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定你问题的第一部分,但至于并行编辑:
在我看来,你基本上是在编写 CMS 系统。与大多数 CMS(CMSii?)一样,您希望每篇文章都有两种可能的状态:签入或签出。这样,您就可以消除 2 个人同时处理同一篇文章的可能性。
因此,基本上,在保存文章条目的数据库表中,您需要一个名为
checked_out
的行,默认为0
。当编辑者点击编辑文章时,您的代码首先检查以确保
checked_out == 0
。这样它就知道您是唯一正在处理该特定文章的人。然后,如果它确实允许您处理文章,请将checked_out
设置为1
。当您单击保存/更新/任何文章时,请确保将checked_out
设置回0
。对我来说似乎是最简单的解决方案。
I'm not sure about the first part of your question, but as for the parallel editing:
It seems to me that you're basically coding a CMS system. As with most CMSs (CMSii?), you're going to want every article to have two possible states: checked in or checked out. That way, you eliminate the possibility of 2 people working on the same article simultaneously.
So basically, in your database table that holds your article entries, you'd want a row called something like
checked_out
, which defaults to0
.When an editor clicks to edit an article, your code first checks to make sure
checked_out == 0
. That way it knows you're the only one working on that particular article. Then, if it does allow you to work on the article, setchecked_out
to1
. When you click to save/update/whatever the article, make sure it setschecked_out
back to0
.Seems like the simplest solution to me.