对于SAE出现的问题:Uncaught exception 'SmartyException' with message 'unable to write file...。
官方给出了详细的FAQ:http://sae.sina.com.cn/?m=faqs&catId=11#show_213
解决方案为:
01 $path = "saemc://templates_c";
02 mkdir($path);
03
04 $smarty = new Smarty;
05 $smarty->template_dir = "./templates";
06 $smarty->compile_dir = $path;
07 .
08 .
09 .
10 $smarty->assign();
11 $smarty->display();
但注意的是,如果smarty中开启了缓存,即
1 $smarty->caching = true;
则也需要同样指定
view source
print ?
1 $smarty->cache_dir = "saemc://templates_c";