dqfkd82886 2012-10-08 07:26
浏览 5
已采纳

如何使用php优化网站的可编辑内容? [关闭]

I got a problem and it was hard to formulate the question in a simple manner.

Im making website, and i want to optimise it to have less server requests, and for website to stay flexible in editing manner: * where i could some "rarely editable content" (logo, menu, background,footer, etc.) * and some other content that will be editable very often (text areas, galleries and more)

I was thinking about making all this in small php peaces and then use php include. The problem is that i will have to create a lot of small files. And it would be a lot of server requests, and a lot of hassle when website will have more and more files.

Is there a better way to manage websites "rarely editable" and normal content?

If no, maybe can i somehow combine at least "rarely editable" content in one file? like header, menu and footer? And use it with one include?

Im not good at php but i think i would manage it if the answer would be nice :)

  • 写回答

1条回答 默认 最新

  • du1108 2012-10-08 07:32
    关注

    Using "include" or "require" in a php script does not produce server requests. It only works on filesystem level. If you use one file i.e. "index.php" and include the rest in that script, you will only have one request from the client (except images, javascript etc. of course).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误