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

php中的include_php问题

WBOY
Release: 2016-06-23 13:52:42
Original
914 people have browsed it

新版本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

http://www.smarty.net/docsv2/en/language.function.include



include方法好像适用于引用模板文件,我现在要在模板文件里面引用php文件啊//

Smarty != php

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

Smarty != php

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



分析到位啊,我用SmartyBC程序已调通,我想知道如何用注册插件的方式来实现程序代码和显示分离,能否贴个实列或者链接啊。。

Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template