server variables as in $_SERVER[] are very helpful in building scripts which run
on different servers. instead of hardcoding variables these might do the
trick
this snippet will produce a list of all available server
variables
01<?php 02 03$str='<?php 04 05 // all available server variables on '.$_SERVER['HTTP_HOST'].' 06'; 07 08// list all available server variables 09foreach($_SERVERas$key=>$value) 10{ 11$str.=' 12 $_SERVER[\''.$key.'\'] = \''.$value.'\';'; 13} 14 15$str.=' 16 17'.chr(63).'> 18'; 19 20// output the string as highlighted PHP source 21highlight_string($str); 22 23?>