• <ul id="cgeq2"></ul>
  • 歡迎您光臨深圳塔燈網絡科技有限公司!
    電話圖標 余先生:13699882642

    織夢出現系統基本參數空白或顯示Call to undefined function make_hash()

    發表日期:2018-08 文章編輯:小燈 瀏覽次數:1614

    最新的織夢版本(2018-01-09)修改了include文件夾中的common.func.php,增加了兩個函數。

    下載的模板文件夾中如果提供了common.func.php文件,很有可能沒有這兩個函數,于是會造成錯誤。

    需要將這兩個函數的代碼粘貼到/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;}


    /**將以上代碼粘貼到

    * 載入小助手,系統默認載入小助手

    這段代碼的上方即可。



    本頁內容由塔燈網絡科技有限公司通過網絡收集編輯所得,所有資料僅供用戶參考了本站不擁有所有權,如您認為本網頁中由涉嫌抄襲的內容,請及時與我們聯系,并提供相關證據,工作人員會在5工作日內聯系您,一經查實,本站立刻刪除侵權內容。本文鏈接:http://www.juherenli.com/6328.html
    相關cms文章