十年網(wǎng)站開發(fā)經(jīng)驗 + 多家企業(yè)客戶 + 靠譜的建站團隊
量身定制 + 運營維護+專業(yè)推廣+無憂售后,網(wǎng)站問題一站解決
創(chuàng)新互聯(lián)www.cdcxhl.cn八線動態(tài)BGP香港云服務(wù)器提供商,新人活動買多久送多久,劃算不套路!

這篇文章主要介紹解決織夢dedecms出現(xiàn)系統(tǒng)基本參數(shù)空白的方法,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!
織夢dedecms出現(xiàn)系統(tǒng)基本參數(shù)空白怎么辦?
織夢dedecms出現(xiàn)系統(tǒng)基本參數(shù)空白或顯示Call to undefined function make_hash()
推薦學(xué)習(xí):織夢cms
最新的織夢版本(2018-01-09)修改了include文件夾中的common.func.php,增加了兩個函數(shù)。
下載的模板文件夾中如果提供了common.func.php文件,很有可能沒有這兩個函數(shù),于是會造成錯誤。
需要將這兩個函數(shù)的代碼粘貼到/include/common.func.php文件中,代碼如下:
function make_hash()
{
$rand = dede_random_bytes(16);
$_SESSION['token'] = ($rand === FALSE)
? md5(uniqid(mt_rand(), TRUE))
: bin2hex($rand);
return $_SESSION['token'];
}
function dede_random_bytes($length)
{
if (empty($length) OR ! ctype_digit((string) $length))
{
return FALSE;
}
if (function_exists('random_bytes'))
{
try
{
return random_bytes((int) $length);
}
catch (Exception $e)
{
return FALSE;
}
}
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('5.4') && stream_set_chunk_size($fp, $length);
$output = fread($fp, $length);
fclose($fp);
if ($output !== FALSE)
{
return $output;
}
}
if (function_exists('openssl_random_pseudo_bytes'))
{
return openssl_random_pseudo_bytes($length);
}
return FALSE;
}將以上代碼粘貼到
/**
* 載入小助手,系統(tǒng)默認載入小助手
這段代碼的上方即可。
以上是解決織夢dedecms出現(xiàn)系統(tǒng)基本參數(shù)空白的方法的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)-成都網(wǎng)站建設(shè)公司行業(yè)資訊頻道!