When I recently downloaded dedecms V5.7, when I logged in to the backend, the username and password were correct, but I couldn’t jump and enter the backend management page. After tracking for a long time, I found the root directory /include/userlogin. The position around line 289 in .class.php and the position after
@<span session_register</span>(<span $this</span>->keepUserIDTag);
Used
<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();
That’s it!
<span> </span>