zoukankan      html  css  js  c++  java
  • 织梦后台登录空白解决方法

    从事php工作,最近使用  php5.4 后发现织梦网的后台登陆显示空白。查找原因,在php5.4的说明中看到了其取消了对session_register的支持。

     

    解决方法:找include/userlogin.class.php里面的keepuser()函数,将其修改为以下代码即可

    function keepUser(){

        if($this->userID != '' && $this->userType != ''){

                    global $admincachefile,$adminstyle;

                    if(empty($adminstyle)) $adminstyle = 'dedecms';

                    

                    if (!isset($_SESSION[$this->keepUserIDTag]))

                    

                    $_SESSION[$this->keepUserIDTag] = $this->userID;

                    if (!isset($_SESSION[$this->keepUserTypeTag]))

                    

                    $_SESSION[$this->keepUserTypeTag] = $this->userType;

                    if (!isset($_SESSION[$this->keepUserChannelTag]))

                    

                    $_SESSION[$this->keepUserChannelTag] = $this->userChannel;

                    if (!isset($_SESSION[$this->keepUserNameTag]))

                    

                    $_SESSION[$this->keepUserNameTag] = $this->userName;

                    if (!isset($_SESSION[$this->keepUserPurviewTag]))

                    

                    $_SESSION[$this->keepUserPurviewTag] = $this->userPurview;

                    if (!isset($_SESSION[$this->keepAdminStyleTag]))

                    

                    $_SESSION[$this->keepAdminStyleTag] = $adminstyle;

                    

                    

                    PutCookie('DedeUserID', $this->userID, 3600 * 24, '/');

                    PutCookie('DedeLoginTime', time(), 3600 * 24, '/');

                    

                    $this->ReWriteAdminChannel();

                    

                    return 1;

            }else{

                  return -1;

            }

    }

  • 相关阅读:
    我真的没读野鸡大学!是他们不好好起名字!
    Request.Cookies和Response.Cookies
    深受理科生喜欢的10大专业
    如何玩转“互联网+教育”?
    js调试工具Console命令详解
    XSS获取cookie并利用
    257. Binary Tree Paths
    EXEC sp_executesql with multiple parameters
    235. Lowest Common Ancestor of a Binary Search Tree
    226. Invert Binary Tree
  • 原文地址:https://www.cnblogs.com/lingzhao/p/3534002.html
Copyright © 2011-2022 走看看