dtqu72830 2012-11-04 21:45
浏览 87
已采纳

会话变量泄漏到全局命名空间

index.php

session_start();
$_SESSION['a']='test';
echo $a;
die();

When I run the above, the first time I get a blank screen with no error. After page refresh it outputs the word test

It does not do this on my development server, only on production (shared on Hostgator).

Is this a server fault?

  • 写回答

1条回答 默认 最新

  • dsfds656545 2012-11-04 21:49
    关注

    register_globals is unfortunately turned on with your Hostgator hosting. You'll need to turn it off in your php.ini, if they give you access to it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部