最新活动:电脑PC端+手机端+微网站+自适应网页多模板选择-建站388元起价!!!
当前位置:主页 > 网站建设 > DedeCMS 5.7不兼容PHP 5.4版本的解决办法,dedecms

DedeCMS 5.7不兼容PHP 5.4版本的解决办法,dedecms

时间:2023-07-22 14:07:22 阅读: 文章分类: 网站建设 作者: 织梦编辑员

导读:dedecmsdedecmsPHP 5.4相对与5.3的变化还是很大的,废除了不少原因的函数,这也导致了一些CMS无法完美支持的问题,比如DedeCMS系统。 在PHP 5.4下,登录De手机模板dede。

手机模板dede

PHP 5.4相对与5.3的变化还是很大的,废除了不少原因的函数,这也导致了一些CMS无法完美支持的问题,比如DedeCMS系统。

在PHP 5.4下,登录DedeCMS后台输入用户名和密码后没有提示显示为空白,主要原为是php5.4的版本废除了session_register函数。可以采用如$_SESSION[$this->keepUserIDTag] = $this->userID; 这种方式处理完整代码如下:

解决方法一:

打开 include/userlogin.class.php这个文件,在287行到308行原内容如下:

@session_register($this->织梦手机模板;keepUserIDTag); $_SESSION[$this->keepUserIDTag] = $this->userID; @session_register($this->keepUserTypeTag); $_SESSION[$this->keepUserTypeTag] = $this->userType; @session_register($this->keepUserChannelTag); $_SESSION[$this->keepUserChannelTag] = $this->userChann织梦首页模板el; @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, ‘/’);

替换成

global $admincachefile,$adminstyle; if(empty($adminstyle)) $adminstyle = ‘dedecms’; //@session_register($this->keepUserIDTag); $_SESSION[$this->keepUserIDTag] = $this->keepUserIDTag; $_SESSION[$this->keepUserIDTag] = $this->userID; //@session_register($this->keepUserTypeTag); $_SESSION[$this->keepUserTypeTag] = $this->keepUserTypeTag; $_SESSION[$this->keepUserTypeTag] = $this->userType; // @session_register($this->keepUserChannelTag); $_SESSION[$this->keepUserChannelTag] = $this->keepUserChannelTag; $_SESSION[$this->keepUserChannelTag] = $this->userChannel; //@session_register($this->keepUserNameTag); $_SESSION[$this->keepUserNameTag] = $this->keepUserNameTag; $_SESSION[$this->keepUserNameTag] = $this->userName; //@session_register($this->keepUserPurviewTag); $_SESSION[$this->keepUserPurviewTag] = $this->keepUserPurviewTag; $_SESSION[$this->keepUserPurviewTag] = $this->userPurview; // @session_register($this->keepAdminStyleTag); $_SESSION[$this->keepAdminStyleTag] = $this->keepAdminStyleTag; $_SESSION[$this->keepAdminStyleTag] = $adminstyle; PutCookie(‘DedeUserID’, $this->userID, 3600 * 24, ‘/’); PutCookie(‘DedeLoginTime’, time(), 3600 * 24, ‘/’);

关键词标签: CMS 解决办法 不兼容

声明: 本文由我的SEOUC技术文章主页发布于:2023-07-22 ,文章DedeCMS 5.7不兼容PHP 5.4版本的解决办法,dedecms主要讲述解决办法,不兼容,CMS网站建设源码以及服务器配置搭建相关技术文章。转载请保留链接: https://www.seouc.com/article/web_34562.html

我的IDC 网站建设技术SEOUC.COM
专注网站建设,SEO优化,小程序设计制作搭建开发定制网站等,数千家网站定制开发案例,网站推广技术服务。
  • 5000+合作客服
  • 8年从业经验
  • 150+覆盖行业
  • 最新热门源码技术文章