开发者

PHP script unable to access session data if called using ajax

If i call a php script using ajax im unable to access session variables set by another php script though both scripts are on the same domain, and i have session_start() in both the scripts. If however the php script is called directly it is able to access session variables. Why does this happen ?. Any way to f开发者_运维技巧ix the problem ?

Please Help. Thank You.


Use something like Firefox's HTTPFox or FireBug to view what's going across the wire when you directly visit the URL or do it via Ajax. Most likely the session cookie isn't being sent properly (or at all) with the AJAX call, so a new blank session is being created.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜