Analysis of methods to clear and destroy session in php, clear and destroy session in php_PHP tutorial

WBOY
Release: 2016-07-13 10:02:09
Original
934 people have browsed it

Analysis of the method of clearing and destroying session in php, clearing and destroying session in php

This article analyzes the method of clearing and destroying session in php. Share it with everyone for your reference. The specific analysis is as follows:

The following code deletes a single session value and all sessions respectively

unset() is used to release an existing session value. You can use the session_destroy() function to destroy all sessions.

<&#63;php
unset($_SESSION['views']);
&#63;>
Copy after login

Destroy all sessions

<&#63;php
Session_start();
//...
session_destroy();
&#63;>
Copy after login

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/970859.htmlTechArticleAnalysis of the method of clearing and destroying the session in php, php clearing and destroying the session. This article analyzes the method of clearing and destroying the session in php. . Share it with everyone for your reference. The specific analysis is as follows: Next...
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