开发者

session id null php

开发者 https://www.devze.com 2023-03-07 17:07 出处:网络
I have one test.php file. I wrote two lines in it. session_start(); echo session_id(); It gives me full session id when I run it from command line.

I have one test.php file. I wrote two lines in it.

session_start();
echo session_id();

It gives me full session id when I run it from command line.

When I call this script from browser it outputs null. My web server is apache.

开发者_StackOverflow社区

What is the problem?


session_start() will return TRUE or FALSE if a session couldn't be started. Try to output that value


try

print_r(session_id());

and what is the output

0

精彩评论

暂无评论...
验证码 换一张
取 消