donglin1192 2012-07-13 20:59
浏览 71

如何从php中隔离样式(css + html)

how can i isolate the style (css+html) from php, like put in the php file just some lines including by it the whole style or theme.

ex:

echo 
    eval_template("header") .
    eval_template("body") .
    eval_template("footer")

So in future i can change the whole style without touch the php files any idea ?

  • 写回答

3条回答 默认 最新

  • doujie1908 2012-07-13 21:13
    关注

    there are many ways how you could do this...

    Here's a tutorial on templating in plain PHP http://www.phpro.org/tutorials/Introduction-to-PHP-templating.html

    You can also take a look at the many template engines out there. twig is one of them: http://twig.sensiolabs.org/

    评论

报告相同问题?

悬赏问题

  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题