$_SERVER是个变量,变量就意味着你可以轻松修改它……
php
$_SERVER['ooxx'] = '囧'; //想了想还是给个例子吧
环境变量会出现在$_SERVER
中,所以直接修改环境变量就行
$ YOUR_VARIABLE=here php -r 'print_r($_SERVER);'|grep here
[YOUR_VARIABLE] => here
$ export ANOTHER_VAR=this
$ php -r 'print_r($_SERVER);'|grep this
[ANOTHER_VAR] => this