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
精彩评论