Home  >  Article  >  Backend Development  >  Analysis of methods to clear and destroy session in php, clear and destroy session in php_PHP tutorial

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

WBOY
WBOYOriginal
2016-07-13 10:02:09933browse

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;>

Destroy all sessions

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

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...
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