开发者

How to set REMOTE_USER

开发者 https://www.devze.com 2023-03-18 14:07 出处:网络
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 loc

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

精彩评论

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