Chinaunix

标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决] [打印本页]

作者: Unicorn_angel    时间: 2005-10-22 12:28
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
请HonestQiao大哥给解答一下

  1. // 加载模版引擎
  2. $header = new SmartTemplate("header.htm");
  3. $list = new SmartTemplate("list.htm");
  4. $footer = new SmartTemplate("footer.htm");
  5. ...............................
  6. $header ->; output();
  7. $list ->; assign('list', "公告列表");
  8. $list ->; assign('listart', $listart);
  9. $list ->; assign('tatol', $tatol);
  10. $list ->; assign('page', $multipage);
  11. $list ->; output();
  12. $footer ->; output();

  13. 为什么$list模版无法替换关键字信息,
复制代码

  1. $list = new SmartTemplate("list.htm");
  2. $list ->; assign('list', "公告列表");
  3. $list ->; assign('listart', $listart);
  4. $list ->; assign('tatol', $tatol);
  5. $list ->; assign('page', $multipage);
  6. $list ->; output();
复制代码

这样可以,为什么,有解决方法吗,
作者: HonestQiao    时间: 2005-10-22 13:23
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
看看你的 'class.smarttemplate.php' 281行是什么内容?
作者: HonestQiao    时间: 2005-10-22 13:25
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
http://www.smartphp.net/content/smarttemplate/basic/result.html?menu=94
作者: Unicorn_angel    时间: 2005-10-22 13:50
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
感谢HonestQiao大哥,问题解决

  1. $list ->; assign('list', "公告列表");
  2. $list ->; assign('listart', $listart);
  3. $list ->; assign('tatol', $tatol);
  4. $list ->; assign('page', $multipage);
  5. ......................................................
  6. $output = $list ->; result();
  7. $header ->; output();
  8. echo $output;
  9. $footer ->; output();
复制代码

作者: HonestQiao    时间: 2005-10-22 13:56
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
[quote]原帖由 "Unicorn_angel"][/quote 发表:


这就好,其实你也可以把result带入到一个list叶面里面去的
作者: Unicorn_angel    时间: 2005-10-22 14:15
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
原帖由 "HonestQiao" 发表:


这就好,其实你也可以把result带入到一个list叶面里面去的

  1. $list ->; assign('header',$header->;result());
  2. $list ->; assign('list', "公告列表");
  3. $list ->; assign('listart', $listart);
  4. $list ->; assign('tatol', $tatol);
  5. $list ->; assign('page', $multipage);
  6. $list ->; assign('footer',$footer->;result());
  7. ......................................................
  8. $list ->;output();
复制代码

老大之的是这样吗,
作者: Unicorn_angel    时间: 2005-10-22 14:23
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
老大,还有,
能解释一下为什么吗,这个问题还是有点头脑不清,我刨个根,
作者: HonestQiao    时间: 2005-10-22 16:14
标题: [SmartTemplate]关于模版SmartTemplate之间的嵌套使用[已解决]
他用了ob_xxx




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2