【发布时间】:2013-09-05 08:51:47
【问题描述】:
我是网络开发人员。我的客户要求我编辑发票上的一些说明
喜欢
<ul>
<b>NOTE </b>
<li>Check all the stock on sopt after that company will not claim anything </li>
<li>stock will be return within three days afther that company will deduct 10%</li>
</ul>
我们处理请求并将该文件再次上传到服务器。我们需要一种机制,以便用户有权编辑 php 脚本,但只有指令。自己更改指令,当点击提交表单时,客户端在存储在服务器上的 php 脚本中输入内容更改。
用于实验
<?php
// here the all the code of php
?>
<html>
// here div for instructions
<div id="instructions" >Here goes instruction </div>
</html>
像往常一样,公司指令因政策变化而逐月变化。
我找到了三个解决方案
1-将该指令 div 内容存储到数据库(被我的老板拒绝,不知道为什么)
2-http://sourceforge.net/projects/ontext/(but它在编辑器中加载所有php代码和用户如何在数百行代码中找到指令)//老板说只有指令文本会出现意味着被拒绝
3-查看一些 jquery 以从另一个 php 脚本编辑 div 的内容,但用户可能希望将某些文本加粗,因此当用户想要单击以从另一个脚本更改 div 内容时,我们会在 [what you see in what you get] 编辑器中显示文本.
要求:
<ul><li>
dont store instruction in mysql</li>
<li>
when users want to change instruction it just click on edit (button/labe etc) user gets instructions in editor and changing as they want when submit that page these <b>instruction </b> will be hardcoded in php script
</li>
</ul>
任何人都可以在这方面帮助我。
【问题讨论】:
-
将其保存为文本文件,并将其包含在 php 输出中。您可以非常轻松地使用
<textarea>创建一个页面,以便他们可以编辑文本。
标签: php javascript jquery html content-management-system