我的PHP之旅
新浪Sea使用Smarty的解决方法.
post by:风子 2012-10-30 19:14
$path="saemc://templates_c";//使用MC Wrapper
//此项必须,网上很多解决的方式都没有下面这句,造成目录不存在的错误出现.
mkdir($path); 
$smarty = new Smarty();  
$smarty->template_dir = "./templates"; 
$smarty->compile_dir = $path; //设置编译目录
@$smarty->display("sample.tpl");
//直接使用smarty会报chmod错误,这个错误不会影响到smarty的使用 请加@忽略 

评论:
发表评论:
昵称

邮件地址 (选填)

个人主页 (选填)

内容