Home >Backend Development >PHP Tutorial >php中的include_php有关问题

php中的include_php有关问题

WBOY
WBOYOriginal
2016-06-13 12:03:25917browse

php中的include_php问题
新版本php中已经废弃了include_php方法了。查看了smarty文档,说是“可使用插件恰当地解决从(php)代码分离html的问题”
我现在的A.tpl文件中要引入B.php文件,应该怎么做呀。想在B.php文件中display(B.tpl).实现模板嵌套,不用include_php该怎么做啊?
------解决方案--------------------
http://www.smarty.net/docsv2/en/language.function.include
------解决方案--------------------
Smarty != php

{include_php}是废弃的函数,用注册插件的方式来将程序代码和显示分离,是更好的选择。在Smarty 3.1,{include_php}仅在SmartyBC中可用。

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