用 getenv函數進行處理:
<? = ('DOCUMENT_ROOT'); = ('SERVER_PORT'); = ('SCRIPT_NAME'); = ('HTTP_USER_AGENT'); = ('REQUEST_METHOD'); = ('SERVER_PROTOCOL'); (), (), ?>
示例:
<?() (例:Windows NT COMPUTER 5.1 build 2600('s') (或:('r') (例:5.1["HTTP_HOST"(['SERVER_NAME'["SERVER_ADDR"] (有時候獲取不到,推薦用:(['SERVER_NAME'['REMOTE_ADDR'['SERVER_SOFTWARE'['PROCESSOR_IDENTIFIER'['SystemRoot'['SERVER_NAME'] (建議使用:["HTTP_HOST"['USERDOMAIN'['HTTP_ACCEPT_LANGUAGE'['SERVER_PORT'?>