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 )!