Home > Backend Development > PHP Tutorial > smarty目录有关问题

smarty目录有关问题

WBOY
Release: 2016-06-13 11:58:35
Original
984 people have browsed it

smarty目录问题
    require("./Smarty/libs/Smarty.class.php");
    $smarty=new Smarty;
    $smarty->left_delimiter="{{";
    $smarty->right_delimiter="}}";
    $smarty->assign("main","./templates/a.html");
    $smarty->display("./templates/xx.html");
?>
为什么这里$smarty->assign("main","./templates/a.html")就不可以,
$smarty->assign("main","templates/a.html");?和$smarty->assign("main","a.html");?都可以呢,目录结构是


xx.html
nbsp;html>


    


{{include file=$main}}


23





a.html内容

bb

?

以下是目录结构

------解决方案--------------------
smarty 模板?
Related labels:
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