if (!isset($_SESSION[$this->keepUserIDTag]))一共有六個,全部改為下面這樣:
if (!isset($_SESSION[$this->keepUserIDTag])) //@session_register($this->keepUserIDTag); $_SESSION[$this->keepUserIDTag] = $this->userID; if (!isset($_SESSION[$this->keepUserTypeTag])) //@session_register($this->keepUserTypeTag); $_SESSION[$this->keepUserTypeTag] = $this->userType; if (!isset($_SESSION[$this->keepUserChannelTag])) //@session_register($this->keepUserChannelTag); $_SESSION[$this->keepUserChannelTag] = $this->userChannel; if (!isset($_SESSION[$this->keepUserNameTag])) //@session_register($this->keepUserNameTag); $_SESSION[$this->keepUserNameTag] = $this->userName; if (!isset($_SESSION[$this->keepUserPurviewTag])) //@session_register($this->keepUserPurviewTag); $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; if (!isset($_SESSION[$this->keepAdminStyleTag])) //@session_register($this->keepAdminStyleTag); $_SESSION[$this->keepAdminStyleTag] = $adminstyle;重新進入后臺登錄,就可以正常跳轉(zhuǎn)到管理頁面了。 因為對PHP并不熟,網(wǎng)上一般都說是data/common.inc.php文件編碼的問題,把編碼要改為無BOM格式文件保存,居然沒有說是php5.4版本的問題 另外一種方法: 在include/helpers/util.helper.php末尾加入以下代碼
function fix_session_register(){ function session_register(){ $args = func_get_args(); foreach ($args as $key){ $_SESSION[$key]=$GLOBALS[$key]; } } function session_is_registered($key){ return isset($_SESSION[$key]); } function session_unregister($key){ unset($_SESSION[$key]); } } if (!function_exists('session_register')) fix_session_register();這樣php5.4下dedecms就能正常使用了。
版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!
轉(zhuǎn)載請注明: Dedecms教程:后臺登錄空白的解決方法