" mark; 2. Modify the content in "php.ini" to "session.auto_start=1"; 3. Set the session save path."/> " mark; 2. Modify the content in "php.ini" to "session.auto_start=1"; 3. Set the session save path.">

Home  >  Article  >  Backend Development  >  What to do if php cannot get the value of session

What to do if php cannot get the value of session

藏色散人
藏色散人Original
2020-08-07 10:20:082692browse

Solution to the problem that php cannot get the session value: 1. Add the statement "session_start();" before the "" sign; 2. Modify the content in "php.ini" to "session.auto_start= 1"; 3. Set the session save path.

What to do if php cannot get the value of session

Recommended: "PHP Video Tutorial"

A solution to the problem that php cannot obtain the session value

1. Check whether the sentence is before the mark. If not, please put it before the mark.

2. If after the above operation, "Warning: session_start() [function.session-start" message appears

Solution:

Modify the session in php.ini .auto_start = 0 is session.auto_start = 1

3. Have you set the session save path?

You need to modify the session.save_path = "C:/TMP" in php.ini, TMP file If the folder does not exist, create it.

The above is the detailed content of What to do if php cannot get the value of session. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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