Home  >  Article  >  Backend Development  >  The use of session in PHP_PHP tutorial

The use of session in PHP_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:35:161154browse

1. Initialization (must be used before using session, just use one for each page)

2. Save

$_SESSION[]=;

( can be double, bool, int, array, object type data)

Example:

$_SESSION['']="";

3. Take out the specified

Example:

$uName=$_SESSION[''];

4. Delete the specified

Example:

($_SESSION['']);

5. Delete all sessions (delete the session file corresponding to the current browser)

6. Get session_id

session_id();

SID; //Constant

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/746296.htmlTechArticle1. Initialization (must be used before using session, just use one for each page) 2. Save $_SESSION [ ]= ; (can be double, bool, int, array, object type data) Example: $_S...
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