Home  >  Article  >  php教程  >  注意:php5.4删除了session_unregister函数

注意:php5.4删除了session_unregister函数

WBOY
WBOYOriginal
2016-06-13 11:42:241304browse

前几天安装了dedecms系统,当在后台安全退出的时候,后台出现空白,先前只分析其他功能去了,也没太注意安全,看了一下安全退出的代码,是这样写的:

复制代码 代码如下:


function exitUser()
  {
    ClearMyAddon();
    @($this->keepUserIDTag);
    @session_unregister($this->keepUserTypeTag);
    @session_unregister($this->keepUserChannelTag);
    @session_unregister($this->keepUserNameTag);
    @session_unregister($this->keepUserPurviewTag);
    DropCookie('dedeAdmindir');
    DropCookie('DedeUserID');
    DropCookie('DedeLoginTime');
    $_SESSION = array();
  }


这才恍然大悟,以前写过一篇dede安装完成后登录后台出现空白的文章,这时才想起可能是php版本的问题,我的php版本是5.4版本,查了一下确实因为新版本的问题,原来php5.4版本中,删除了session_unregister该函数,丫的,dedecms也太不与时俱进了,最起码得支持最新的php版本吧,唉,害的我花费时间来分析。后台吧这个函数替换成unset就完美解决了。
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