首页 > 代码库 > 在新浪云SAE中使用smarty引擎模版
在新浪云SAE中使用smarty引擎模版
在新浪云上使用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,并开启。
再更改smarty配置文件中的编译目录和缓存目录如下:
1 $smarty->compile_dir = ‘saemc://smartytpl/‘;2 $smarty->cache_dir = ‘saemc://smartytpl/‘;3 smarty->compile_locking = false; // 防止调用touch,saemc会自动更新时间,不需要touch
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。