您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

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

2024/2/23 19:05:06发布13次查看
smarty模板路径配置问题(急)
昨天装上smarty,可是在配置模板的路径时遇到问题。
define(root, str_replace(\\, /, dirname(__file__)).'/');
require 'libs/smarty.class.php';
$smarty= new smarty();
$smarty->settemplatedir(root.'templates/');
print_r($smarty->gettemplatedir());

运行输出的模板路径如下:
 f:/php program/smarty/templates\
也就是最后的那个路径分隔符怎么也调不对,在、一直没调好,怎么办?
smarty php 分享到:
------解决方案--------------------
不需要改!
linux 下路径符为 /
window 下默认路径符为 \ 同时支持 /
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product