" 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
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.
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!