织梦dedecms出现系统基本参数空白怎么办
最新的织梦版本(II0I.VIII-0I.-0IX)修改了include文件夹中的common.func.php,增加了两个函数.
下载的模板文件夹中
更多精彩就在: 51免费论文网|www.jxszl.com
如果提供了common.func.php文件,很有可能没有这两个函数,于是会造成错误.
需要将这两个函数的代码粘贴到/include/common.func.php文件中,代码如下:
functionmake_hash()
{
$rand=dede_random_bytes(I.VI);
$_SESSION[token]=($rand===FALSE)
?mdV(uniqid(mt_rand(),TRUE))
:binIIhex($rand);
return$_SESSION[token];
}
functiondede_random_bytes($length)
{
if(empty($length)OR!ctype_digit((string)$length))
{
returnFALSE;
}
if(function_exists(random_bytes))
{
try
{
returnrandom_bytes((int)$length);
}
catch(Exception$e)
{
returnFALSE;
}
}
if(defined(MCRYPT_DEV_URANDOM)&&($output=mcrypt_create_iv($length,MCRYPT_DEV_URANDOM))!==FALSE)
{
return$output;
}
if(is_readable(/dev/urandom)&&($fp=fopen(/dev/urandom,rb))!==FALSE)
{
is_php(V.IV)&&stream_set_chunk_size($fp,$length);
$output=fread($fp,$length);
fclose($fp);
if($output!==FALSE)
{
return$output;
}
}
if(function_exists(openssl_random_pseudo_bytes))
{
returnopenssl_random_pseudo_bytes($length);
}
returnFALSE;
}
将以上代码粘贴到
/**
*载入小助手,系统默认载入小助手
这段代码的上方即可.
原文链接:http://www.jxszl.com/biancheng/dedecms/75126.html
热门阅读