Home  >  Article  >  Backend Development  >  php用户退出解决方法

php用户退出解决方法

WBOY
WBOYOriginal
2016-06-13 10:17:251516browse

php用户退出
我注册和登陆都做了 我不知道怎么做退出?那个能给我一个详细的退出程序 谢谢

------解决方案--------------------
$_SESSION['user'] = 'lowell';
session_unset();
session_destroy();
------解决方案--------------------
session_destroy();
$_SESSION = array();
unset($_SESSION[$val]);
setCookie($var,$val,time()-3600);
------解决方案--------------------

PHP code
session_start();session_destroy();header("Location: login.php");<br><font color="#e78608">------解决方案--------------------</font><br><?php <br />include "comm.php";<br>session_destroy();<br>get_show_msg("login.php","退出登录");<br>?><div class="clear">
                 
              
              
        
            </div>
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