当前位置:Gxlcms > PHP教程 > php获取系统信息的方法_PHP教程

php获取系统信息的方法_PHP教程

时间:2021-07-01 10:21:17 帮助过:8人阅读


用 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'?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440244.htmlTechArticle用 getenv函数进行处理: ? = ('DOCUMENT_ROOT'); = ('SERVER_PORT'); = ('SCRIPT_NAME'); = ('HTTP_USER_AGENT'); = ('REQUEST_METHOD'); = ('SERVER_PROTOCOL'); (), (), ? 示例:...

人气教程排行