【问题标题】:Content Managment system for my own website我自己网站的内容管理系统
【发布时间】: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 输出中。您可以非常轻松地使用 &lt;textarea&gt; 创建一个页面,以便他们可以编辑文本。

标签: php javascript jquery html content-management-system


【解决方案1】:

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

回答问题的技术部分:

  • 将内容存储在数据库中
  • 用一个帖子表单和一个所见即所得的编辑器创建一个单独的 php 页面来编辑内容
  • 在您的主 php 脚本中插入数据库中的内容
  • 不要在主脚本中硬编码内容,也不要动态修改它

希望这会有所帮助。

【讨论】:

    【解决方案2】:

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

    链接是

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

    【讨论】:

      猜你喜欢
      • 2023-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-31
      • 1970-01-01
      相关资源
      最近更新 更多