
请高手看下我的smarty缓存配置哪里错了
我在测试缓存时,配置缓存目录为/caches,测试时缓存也能正常运行,但是在缓存目录下没有生成相应的缓存文件,不知道是什么原因。smarty配置代码:<?phpinclu...
我在测试缓存时,配置缓存目录为/caches,测试时缓存也能正常运行,但是在缓存目录下没有生成相应的缓存文件,不知道是什么原因。
smarty配置代码:
<?php
include_once("smarty/smarty.class.php");
$smarty=new smarty();
$smarty->config_dir="smarty/Config_File.class.php";
$smarty->cache_dir="./caches";
$smarty->caching=true;
$smarty->cache_lifetime=60;
$smarty->template_dir="./templates";
$smarty->compile_dir="./templates_c";
$smarty->cache_dir="./smarty_cache";
$smarty->left_delimiter="{";
$smarty->right_delimiter="}";
?> 展开
smarty配置代码:
<?php
include_once("smarty/smarty.class.php");
$smarty=new smarty();
$smarty->config_dir="smarty/Config_File.class.php";
$smarty->cache_dir="./caches";
$smarty->caching=true;
$smarty->cache_lifetime=60;
$smarty->template_dir="./templates";
$smarty->compile_dir="./templates_c";
$smarty->cache_dir="./smarty_cache";
$smarty->left_delimiter="{";
$smarty->right_delimiter="}";
?> 展开
1个回答
展开全部
从你的代码来看你的缓存文件应该会是smarty_cache文件夹中。
因为你定义了两个$smarty->cache_dir所以会执行第二个,配置缓存文件就不会在/caches文件夹下。
因为你定义了两个$smarty->cache_dir所以会执行第二个,配置缓存文件就不会在/caches文件夹下。
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询