开发者

How to set REMOTE_USER

I'm developi开发者_JS百科ng a PHP-based application that will be used in a sigle sign-on environment. I rely on the REMOTE_USER variable for user information. Is it possible set REMOTE_USER on my local machine (MAMP on Mac OS 10.6) using dummy values to make local development easier?


Somewhere in a config file or at the top of your file, write:

if ($_SERVER['REMOTE_ADDR'] == '127.0.0.1')
    $_SERVER['REMOTE_USER'] = 'whatever';
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜