DEDE 系统基本参数 修改时出现 config.cache.inc.php'不支持写入,无法修改系统配置参数!
functionReWriteConfigAuto(){global$dsql;$configfile=DEDEROOT.'/data/config.cache.inc....
function ReWriteConfigAuto()
{
global $dsql;
$configfile = DEDEROOT.'/data/config.cache.inc.php';
if(!is_writeable($configfile))
{
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!";
//ClearAllLink();
exit();
}
$fp = fopen($configfile,'w');
flock($fp,3);
fwrite($fp,"<"."?php\r\n");
$dsql->SetQuery("Select `varname`,`type`,`value`,`groupid` From `#@__sysconfig` order by aid asc ");
$dsql->Execute();
while($row = $dsql->GetArray())
{
if($row['type']=='number') fwrite($fp,"\${$row['varname']} = ".$row['value'].";\r\n");
else fwrite($fp,"\${$row['varname']} = '".str_replace("'",'',$row[' http://www.520tulou.com'])."';\r\n");
}
fwrite($fp,"?".">");
fclose($fp);
}
服务器的写入权限已经开了。 展开
{
global $dsql;
$configfile = DEDEROOT.'/data/config.cache.inc.php';
if(!is_writeable($configfile))
{
echo "配置文件'{$configfile}'不支持写入,无法修改系统配置参数!";
//ClearAllLink();
exit();
}
$fp = fopen($configfile,'w');
flock($fp,3);
fwrite($fp,"<"."?php\r\n");
$dsql->SetQuery("Select `varname`,`type`,`value`,`groupid` From `#@__sysconfig` order by aid asc ");
$dsql->Execute();
while($row = $dsql->GetArray())
{
if($row['type']=='number') fwrite($fp,"\${$row['varname']} = ".$row['value'].";\r\n");
else fwrite($fp,"\${$row['varname']} = '".str_replace("'",'',$row[' http://www.520tulou.com'])."';\r\n");
}
fwrite($fp,"?".">");
fclose($fp);
}
服务器的写入权限已经开了。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询