Home  >  Article  >  php教程  >  织梦v5.7安装在php5.3以上版本登陆后台不能跳转问题

织梦v5.7安装在php5.3以上版本登陆后台不能跳转问题

WBOY
WBOYOriginal
2016-06-13 11:29:541077browse

         最近下了dedecms V5.7时,在登陆后台时,用户名和密码也没错,就是跳转不走,进不了后台管理页面,追踪了好久才发现根目录/include/userlogin.class.php中289行左右的位置及之后的位置

@<span session_register</span>(<span $this</span>->keepUserIDTag);

 

使用了

<span><span <strong><span session_register</span></strong></span>函数,就在这个地方卡住了,而且还@了错误信息,原来<br /><span>    本函数已自 PHP 5.3.0 起</span><em class="emphasis">废弃</em><span>并将自 PHP 5.4.0 起</span><em class="emphasis">移除</em><span>。我的php版本是5.4.0的<br /></span>解决方法<br />加入代码<br /></span>
<span function</span><span  fix_session_register(){
    </span><span function</span> <span session_register</span><span (){
   </span><span $args</span> = <span func_get_args</span><span ();
</span><span foreach</span> (<span $args</span> <span as</span> <span $key</span><span ){
</span><span $_SESSION</span>[<span $key</span>]=<span $GLOBALS</span>[<span $key</span><span ];
   }
 }
}

</span><span if</span> (!<span function_exists</span>('session_register')) fix_session_register();

就可以啦!

<span> </span>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn