开发者

session id null php

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜