Home>Article>Backend Development> What should I do if php returns no session?
Solution for php not returning session: 1. Place session_start before themark; 2. Modify the content in php.ini to "session.auto_start =1"; 3. Set session save path.
#The operating environment of this article: Windows 7 system, PHP version 7.4, Dell G3 computer.
What should I do if php returns no session?
A solution to the problem that php cannot obtain the session value:
1. Confirm< ?php session_start();?>
Is this sentence before themark? If not, please put it before themark.
2. If after the above operation, "Warning: session_start() [function.session-start" message appears
Solution:
Modify # in php.ini ##session.auto_start = 0is
session.auto_start = 1
PHP Video Tutorial"
The above is the detailed content of What should I do if php returns no session?. For more information, please follow other related articles on the PHP Chinese website!