Smarty配置:
include_once("Smarty.class.php");
$smarty = new smarty();
$smarty->template_dir = './templates/';
$smarty->compile_dir = './templates_c/';
$smarty->config_dir = './config/';
$smarty->cache_dir = './cache/';
$smarty->caching = true;
$smarty->cache_lifetime= 60;
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
//****************** 这个是我的smarty类的调用
include("smarty_inc.php");
// $name="php中文网站";
$value=array(
'a'=>'php学习1001',
'b'=>'java',
'c'=>'c++',
);
$smarty->assign('name',$value);
$smarty->display("index.html");
这个是我的index.php的文件
<body>
{foreach from=$name item=a}
{$a}<br >
{/foreach}
</body>
这个是我的index.html 文件 可是我出来cache文件是
132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256260771;s:7:"expires";i:1256260831;s:13:"cache_serials";a:0:{}}<!
php学习1001<br >
java<br >
c++<br >
</body>
</html>
如果我改动php学习100 按理cache文件出现的
132
a:4:{s:8:"template";a:1:{s:10:"index.html";b:1;}s:9:"timestamp";i:1256260771;s:7:"expires";i:1256260831;s:13:"cache_serials";a:0:{}}<!
这串代码应该出现在php学习100的位置啊,我的代码或者配置哪里错了,希望指点一下
