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

php用户退出解决方法

WBOY
Release: 2016-06-13 13:35:45
Original
1252 people have browsed it

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>
Copy after login
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template