Home  >  Article  >  Backend Development  >  Smarty模板路径配置有关问题(急)

Smarty模板路径配置有关问题(急)

WBOY
WBOYOriginal
2016-06-13 11:28:12809browse

Smarty模板路径配置问题(急)
昨天装上smarty,可是在配置模板的路径时遇到问题。

<br />define("ROOT", str_replace("\\", "/", dirname(__FILE__)).'/');<br />require 'libs/Smarty.class.php';<br />$smarty= new Smarty();<br />$smarty->setTemplateDir(ROOT.'templates/');  <br /> print_r($smarty->getTemplateDir());      <br />

运行输出的模板路径如下:
 F:/PHP program/Smarty/templates\
也就是最后的那个路径分隔符怎么也调不对,在、一直没调好,怎么办?

Smarty PHP
Statement:
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