Home > Backend Development > PHP Tutorial > The use of session in PHP_PHP tutorial

The use of session in PHP_PHP tutorial

WBOY
Release: 2016-07-13 10:35:16
Original
1183 people have browsed it

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