douzhangkui2467 2011-01-24 00:58
浏览 44
已采纳

PHP的布局/装饰框架?

A little of my background... I'm fairly new to PHP as I primarily develop in Java. PHP interests me, thus I decided to spend my free time learning it by trying to make one of my relatively static websites more dynamic using PHP.

Right now, I'm have a problem in decorating all the web pages... not really a problem, but it bugs me. I know I can include the header and footer files in every page, but I'm wondering if PHP has some sort of web-based layout/decoration framework?

In Java, I use Sitemesh to decorate my web pages without the need for me to explicitly include the header/footer files. I'm hoping I can do the same in PHP too.

If you have abundance of experience developing web applications in PHP, can you please share some of your knowledge with me here? I'm interested to know the techniques you use to easily decorate your web pages and to change the page layout in the future.

I greatly appreciate your tips and ideas. Thanks much.

  • 写回答

2条回答 默认 最新

  • douyan1453 2011-01-24 01:02
    关注

    PHP doesn't neccessarily have a 'decor' framework, but more generally it has many MVC based frameworks for the language itself. Many of these include 'templating' elements that allow for such headers, footers, partial layout content, etc...

    Some of these are

    Generally, people will recommend what they use, and most of the time you can't tell if they use it because they like it, or like it because they use it. I recommend consulting the specific frameworks documentation to get a feel for whether or not it fits your needs.

    EDIT :

    After a second read of your question, I also thought you might look into more simple CMS solutions. While you could accomplish what you want to do with any of these frameworks, it might be less work to use a CMS that uses a templating engine, if all you want to do is manage content and the way it looks. The frameworks listed above are a bit more adept and building web applications (for comparison, a CMS is a web application).

    • Wordpress
    • ExpressionEngine (By the makers of Codeigniter)
    • Drupal
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何在3D高斯飞溅的渲染的场景中获得一个可控的旋转物体
  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败