dtqu72830 2012-11-05 05: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-05 05: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.

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

报告相同问题?