Home >Backend Development >PHP Problem >How to modify session value in php
php method to modify the session value: 1. In the PHP file, use the "ini_set('option', 'value'); statement to modify the value; 2. Use the specific function function session_set_cookie_params() to modify the value .
The operating environment of this tutorial: windows7 system, PHP7.1 version, DELL G3 computer
Method 1: In the program Setting, use the ini_set() function to modify (valid only within the script cycle after setting)
session_start(); ini_set('选项', '值');
Method 2: Use a specific function to complete the setting
session_set_cookie_params(有效期, 有效路径,有效域,是否仅安全传输,是否HTTPONLY)
Recommended learning: "PHP Video Tutorial"
The above is the detailed content of How to modify session value in php. For more information, please follow other related articles on the PHP Chinese website!