Home > Backend Development > PHP Problem > How to modify session value in php

How to modify session value in php

青灯夜游
Release: 2023-03-08 19:36:01
Original
3227 people have browsed it

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 .

How to modify session value in php

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('选项', '值');
Copy after login

Method 2: Use a specific function to complete the setting

session_set_cookie_params(有效期, 有效路径,有效域,是否仅安全传输,是否HTTPONLY)
Copy after login

How to modify session value in php

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!

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