我有一个聪明的小问题,但不知道如何解决这个问题。Smarty包含tpl动态内容?
这是我在index.tpl
<body>
{include file='header.tpl'}
{include file='leftmenu.tpl'}
<div id=content>
{include file="news.tpl" }
{include file="rightmenu.tpl"}
</body>
我的问题有这一行
<div id=content>
{include file="news.tpl" }
news.php
是应该显示news.tpl
,因为这是我newssystem文件。
在news.php
,我查询MySQL数据库和结果交予news.tpl
。
但是当我写上面的行中,news.tpl
不知道在哪里,结果从何而来。
希望有人能够帮助。
你必须到'news.php'代码移动到'index.php'。或'index.php'其他包括'news.php'并没有定义'模板tenderer'路径有.. – Sahal