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

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

WBOY
Release: 2016-06-13 12:43:04
Original
1067 people have browsed it

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 />
Copy after login

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

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