zhuyongzhe 2017-12-07 04:18 采纳率: 0%
浏览 721

smarty 模板继承 问题

文件 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条回答 默认 最新

  • COCO_AS 2017-12-11 05:57
    关注

    你的child.tpl是怎么写的?
    感觉是写法有问题

    参考:

    http://www.thinkphp.cn/code/2149.html

    和官网的例子
    https://www.smarty.net/docs/zh_CN/language.function.extends.tpl

    评论

报告相同问题?

悬赏问题

  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码