導讀:dedecmsdedecms今天把電腦上的phpStudy升級到2013版。在登錄本地織夢dedecms5.7時,/dede/login.php居然顯示空白。由于周五我安裝了windows織夢模板下載織夢模板。

今天把電腦上的phpStudy升級到2013版。在登錄本地織夢dedecms5.7時,/dede/login.php居然顯示空白。由于周五我安裝了windows8,因為是電腦問題,等我關掉防火墻配置好電腦服務后,發現還是不行。在百度后終于得到高人的日志指點。
原因很簡單,phpstudy2013版是用的php5.4,而dedecms的login.php中使用了一個被php5.4拋棄不用的函數(是不是真的拋棄我不知道,反正原文這么寫的)
session_register()
意思就是這說個函數不能用了,想用也用不了。方法很簡單,直接注釋掉,不用進行注冊就可以聲明session。
在dedecms目錄include/userlogin.class.php中查找
function keepUser()
大概在281行,把keepUser()函數下的 @session_register(); 整段注釋掉(刪除也可以),結果如下:
function keepUser() { if($this->userID != '' && $this->userType != '') { global $admincachefile,$adminstyle; if(emptyempty($adminstyle)) $adminstyle = 'dedecms'; //@session_register($this->keepUserIDTag); $_SESSION[$this->keepUserIDTag] = $this->userID; //@session_register($this->keepUserTypeTag); $織夢模板免費下裁_SESSION[$this->keepUserTypeTag] = $this->userType; //@session_register($this->keepUserChannelTag); $_SESSI織夢手機模板ON[$this->keepUserChannelTag] = $this->userChannel; //@session_register($this->keepUserNameTag); $_SESSION[$this->keepUserNameTag] = $this->userName; // @session_register($this->keepUserPurviewTag); $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; //@session_register($this->keepAdminStyleTag); $_SESSION[$this->keepAdminStyleTag] = $adminstyle; PutCookie('DedeUserID', $this->userID, 3600 * 24, '/'); PutCookie('DedeLoginTime', time(), 3600 * 24, '/'織夢模板);
關鍵詞標簽: 解決方法 dedecms 后臺
聲明: 本文由我的SEOUC技術文章主頁發布于:2023-07-18 ,文章使用phpstudy時dedecms后臺頁面空白解決方法(PHP版主要講述解決方法,后臺,dedecms網站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_29791.html