php - 我自己网站的内容管理系统

标签 php javascript jquery html content-management-system

我是网络开发人员。我的客户要求我编辑发票上的一些说明
就像

<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 代码以及用户如何在数百行代码中找到指令)//boss said only text of instruction will comemean returned
3-查看一些 jquery 来编辑另一个 php 脚本中的 div 内容,但用户可能希望将某些文本加粗,因此当用户想要单击以更改另一个脚本中的 div 内容时,我们会在 [您所看到的内容] 编辑器中显示文本.


要求:

    <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> 

任何人都可以在这方面帮助我。

最佳答案

讨论你的老板是否是个白痴以及如何应对这个问题超出了本网站的范围。尝试在 https://softwareengineering.stackexchange.com/ 上询问.

回答问题的技术部分:

  • 将内容存储在数据库中
  • 制作一个单独的 PHP 页面,其中包含帖子表单和所见即所得编辑器来编辑内容
  • 在主 PHP 脚本中插入数据库中的内容
  • 不要在主脚本中硬编码内容,也不要动态修改

希望这有帮助。

关于php - 我自己网站的内容管理系统,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18631827/

相关文章:

JavaScript:从 PHP 脚本中提取信息

jQuery 与用户一起滚动 div 直到到达包含 div 的底部

php - 检查ajax请求的失败和成功

php - Ubuntu - Eclipse 和 Netbeans 的替代品

PHP 从二进制字符串中解压一个字节

javascript - 在php中提交表单后如何取消选中复选框?

考虑到colspan和rowspan的Javascript获取表格单元格二维数组

javascript - 如何启动 WebRTC 示例应用程序?

jquery - 点击在redactor js所见即所得html编辑器中显示和编辑

PHP:默认 cURL 超时值