zhuyongzhe
2017-12-07 04:18smarty 模板继承 问题
文件 parent.tpl
<html>
<head>
<title>this is a title</title>
</head>
<body>
this is a content...
</body>
</html>
文件 child.php
<?php
include "init.inc.php";
$smarty->display('extends:parent.tpl|child.tpl');
?>
为什么打开 child.php 不能正常继承,页面显示如下:
{extends file='extends:parent.tpl|child.tpl' extends_resource=true}
- 点赞
- 回答
- 收藏
- 复制链接分享
1条回答
为你推荐
- 如何在smarty模板中访问数组的键和值?
- smarty
- foreach
- arrays
- php
- 4个回答
- 禁用PHP Smarty模板引擎上的缓存?
- smarty
- php
- 2个回答
- Smarty Breadcrumbs“链接”问题
- smarty
- php
- 1个回答
- Smarty获取当前模板文件名/行
- smarty
- php
- 1个回答
- Smarty从课堂上获取while模板
- smarty
- php
- 2个回答
换一换