Home >Backend Development >PHP Tutorial >smarty模板里引出PHP文件

smarty模板里引出PHP文件

WBOY
WBOYOriginal
2016-06-13 10:35:45947browse

smarty模板里引入PHP文件

有一个a.php对应a.tpl的页面,a.tpl里有一个块我是想做成缓存的,其它动态。。

如何实现?

可以把那一块抽出来成b.php对应b.tpl吗,然后做成缓存的。。

如果这样可以,a.tpl要怎么引进b.php,include ?

还有其它办法?

------解决方案--------------------
引用php可以用 include_php 'php路径'; 跟引用tpl一样用。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn