开发者

_SESSION variable not working

I have a PHP script where I try to get a session variable before the HTML headers start.

If I use the 开发者_如何学编程_SESSION variable somewhere in the body of the HTML, for some reason it works. But if I use the _SESSION variable before the HTML starts, I can't get the values out of it.

Would anyone know why this is happening and how I can get the values out of the session variable?


Put session_start(); before using $_SESSION variable.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜