解决帝国cms运行在7.1下开启opcache缓存无法首页模板方案问题
发布时间:2018-06-15 23:18
帝国cms运行在7.1下开启opcache缓存后,首页更换模板方案无法即使显示。
解决方法:
functions.php 修改以下函数
//生成配置文件
function GetConfig($domod=0){
$filename=eReturnTrueEcmsPath()."e/config/config.php";
$exp='//-------EmpireCMS.Public.Cache-------';
$text=ReadFiletext($filename);
$r=explode($exp,$text);
if($r[0]=='')
{
return false;
}
$r[1]=GetPubCache();
if($domod==1)
{
$r[2]=GetModCache();
}
$setting=$r[0].$exp.$r[1].$exp.$r[2].$exp.$r[3];
WriteFiletext_n($filename,$setting);
//防止ob缓存不立即执行
if(function_exists("opcache_reset")){
opcache_reset();
}
}
更新时间:2024-12-18 20:26
解决方法:
functions.php 修改以下函数
//生成配置文件
function GetConfig($domod=0){
$filename=eReturnTrueEcmsPath()."e/config/config.php";
$exp='//-------EmpireCMS.Public.Cache-------';
$text=ReadFiletext($filename);
$r=explode($exp,$text);
if($r[0]=='')
{
return false;
}
$r[1]=GetPubCache();
if($domod==1)
{
$r[2]=GetModCache();
}
$setting=$r[0].$exp.$r[1].$exp.$r[2].$exp.$r[3];
WriteFiletext_n($filename,$setting);
//防止ob缓存不立即执行
if(function_exists("opcache_reset")){
opcache_reset();
}
}
更新时间:2024-12-18 20:26
上一篇:精益求精-帝国网站管理系统7.5正式版开源发布 下一篇:返回列表