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

Content Managment system for my own website

本文关键字:管理系统 网站 我自己      更新时间:2023-09-26

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

<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脚本中输入内容更改occur。

用于测试

<?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/(但它在编辑器中加载php的所有代码和用户如何在代码行的hunders中找到指令)//老板说只有instructionon的文本才会显示为被拒绝
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> 

任何人在这方面帮助我。

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

回答问题的技术部分:

  • 请将内容存储在数据库中
  • 使用post表单和wysiwyg编辑器制作一个单独的php页面来编辑内容
  • 在主php脚本中插入数据库中的内容
  • 不要硬编码主脚本中的内容,也不要动态修改

希望这能有所帮助。

我通过一个开源项目找到了这个解决方案

链接是

http://sourceforge.net/projects/ontext/