首页 > 其他 > 详细

在新浪云SAE中使用smarty引擎模版

时间:2014-08-14 13:54:08      阅读:524      评论:0      收藏:0      [点我收藏+]

  在新浪云上使用smarty时会发现又这样的错误信息:

  “SAE_Fatal_error: Uncaught exception ‘SmartyException‘ with message ‘unable to write file ./web/templates_c/wrt4e95555280ef1‘ ”。

  这是因为不能使用官方下载的smarty文件包,要下载smarty for sae的专门版本,地址:http://code.google.com/p/smarty4sae/downloads/list

  然后拷贝其中的libs文件夹,替换即可。

  接着,在sae相应的项目中找到Mecache,并开启。

  bubuko.com,布布扣

  再更改smarty配置文件中的编译目录和缓存目录如下:

1 $smarty->compile_dir = ‘saemc://smartytpl/‘;
2 $smarty->cache_dir = ‘saemc://smartytpl/‘;
3 smarty->compile_locking =  false; // 防止调用touch,saemc会自动更新时间,不需要touch

 

在新浪云SAE中使用smarty引擎模版,布布扣,bubuko.com

在新浪云SAE中使用smarty引擎模版

原文:http://www.cnblogs.com/jhmydear/p/3912061.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!