duanfuxing2212 2011-02-14 17:06
浏览 14

PHP动态布局

Was wondering if someone could point me in the right direction.

My question is how can i have a static header/ footer and only the main content change. Also I want to know how i can keep the URLs SEO friendly?

One other thing is in my site say the section is web hosting the url i want would be http://example.com/web-hosting. No when that page loads I want there to be a side bar in the content that would be specific to web hosting and this would change depending on what top level category they are in.

If you could point me aat a tutorial or reading resource Id much appreciate it.

Thanks Dave

  • 写回答

3条回答 默认 最新

  • dongping4901 2011-02-14 17:12
    关注

    Without using any frameworks, what you'd do is have the code for each static segment in its own file, then include the files where appropriate in each individual page. Or, you could always just group everything into 'header.php' and 'footer.php', and include those onto every page.

    If you're looking for something with a little more infrastructure, you can take a look at CodeIgniter. You'll have to read through the tutorials a bit, but it provides a framework to create each different visual block of your page once, then incorporate them into individual pages as needed.

    评论

报告相同问题?

悬赏问题

  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探