PHP learning session common functions

黄舟
Release: 2023-03-04 08:26:01
Original
1607 people have browsed it

Last time we talked about the session knowledge learned by PHP. Today our content is to learn the common functions of session in PHP.
There are 11 commonly used functions in session, which are introduced below.
1.session_start(), used to start the session. If the user is already in a session, connect to the original session.
2.session_destroy(), used to end a session.
3.session_name(), access the name of the current session. This function can obtain or reconfigure the current session name.
4.session_moudle_name(), access the current session module. This function obtains or reconfigures the current session module.
5.session_id(), access the id of the current session. This function obtains or reassigns the ID of the currently stored session.
6.session_register(), register new session variables. This function adds a variable to the current session in global variables.
7.session_unregister(), delete the registered variables. This function can delete variables on global variables in the current session.
8.session_decode(), decodes session data.
9.session_encode(), encodes the session data, and uses the zend engine for hash encoding. The above is the content of the common session functions in PHP learning. For more related content, please pay attention to the PHP Chinese website (www.php.cn )!


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