日韩天天综合网_野战两个奶头被亲到高潮_亚洲日韩欧美精品综合_av女人天堂污污污_视频一区**字幕无弹窗_国产亚洲欧美小视频_国内性爱精品在线免费视频_国产一级电影在线播放_日韩欧美内地福利_亚洲一二三不卡片区

使用phpstudy時(shí)dedecms后臺頁面空白解決方法(PHP版本原因)_DedeCms教程

編輯Tag賺U幣
教程Tag:暫無Tag,歡迎添加,賺取U幣!
分享一下使用phpstudy時(shí)dedecms后臺頁面空白的解決辦法(PHP版本原因)
今天把電腦上的phpStudy升級到2013版。在登錄本地織夢dedecms5.7時(shí),/dede/login.php居然顯示空白。由于周五我安裝了windows8,因?yàn)槭请娔X問題,等我關(guān)掉防火墻配置好電腦服務(wù)后,發(fā)現(xiàn)還是不行。在百度后終于得到高人的日志指點(diǎn)。
原因很簡單,phpstudy2013版是用的php5.4,而dedecms的login.php中使用了一個被php5.4拋棄不用的函數(shù)(是不是真的拋棄我不知道,反正原文這么寫的)
session_register()
意思就是這說個函數(shù)不能用了,想用也用不了。方法很簡單,直接注釋掉,不用進(jìn)行注冊就可以聲明session。
在dedecms目錄include/userlogin.class.php中查找
function keepUser() 
大概在281行,把keepUser()函數(shù)下的 @session_register(); 整段注釋掉(刪除也可以),結(jié)果如下:
  1. function keepUser()    
  2. {    
  3. if($this->userID != '' && $this->userType != '')    
  4. {    
  5. global $admincachefile,$adminstyle;    
  6. if(emptyempty($adminstyle)) $adminstyle = 'dedecms';    
  7.   
  8. //@session_register($this->keepUserIDTag);    
  9. $_SESSION[$this->keepUserIDTag] = $this->userID;    
  10.   
  11. //@session_register($this->keepUserTypeTag);    
  12. $_SESSION[$this->keepUserTypeTag] = $this->userType;    
  13.   
  14. //@session_register($this->keepUserChannelTag);    
  15. $_SESSION[$this->keepUserChannelTag] = $this->userChannel;    
  16.   
  17. //@session_register($this->keepUserNameTag);    
  18. $_SESSION[$this->keepUserNameTag] = $this->userName;    
  19.   
  20. // @session_register($this->keepUserPurviewTag);    
  21. $_SESSION[$this->keepUserPurviewTag] = $this->userPurview;    
  22.   
  23. //@session_register($this->keepAdminStyleTag);    
  24. $_SESSION[$this->keepAdminStyleTag] = $adminstyle;    
  25.   
  26. PutCookie('DedeUserID', $this->userID, 3600 * 24, '/');    
  27. PutCookie('DedeLoginTime', time(), 3600 * 24, '/');    
  28.   
  29. $this->ReWriteAdminChannel();    
  30.   
  31. return 1;    
  32. }    
  33. else    
  34. {    
  35. return -1;    
  36. }    
  37. }    
  38. 另外的解決方法就是在include/userlogin.class.php 中聲明一個函數(shù) 
  39. function session_register()    
  40. {   
  41. return true;   
  42. }   
僅供大家學(xué)習(xí)參考哦~希望對你有所幫助。

查看更多 DedeCms教程  織夢模板  織夢DedeCms視頻教程  織夢dedecms專題

來源:模板無憂//所屬分類:DedeCms教程/更新時(shí)間:2020-04-21
相關(guān)DedeCms教程

DedeCms教程教程Rss訂閱Cms教程搜索