PHP Several predefined variables $_server usage Summary, _server Summary
This paper summarizes the usage of several predefined variables $_server in PHP. Share to everyone for your reference. Specific as follows:
Copy the Code code as follows: <?php
Echo ' DocumentRoot: '. $_server[' Document_root ']. '
'; The root directory, defined in the Apache configuration file: httpd.conf For example: DocumentRoot "D:/work/php_root"
Echo ' Httphost: '. $_server[' Http_host ']. '
'; Domain names, such as: localhost
Echo ' phpself: '. $_server[' php_self ']. '
'; The path from the root directory to the file itself
echo ' script filename '. $_server[' Script_filename ']. '
'; Documentroot+phpself
echo ' request URI '. $_server[' Request_uri '. '
'; Start all URL strings from the root directory, including the characters after the question mark
Echo ' request method: '. $_server[' Request_method '. '
'; Method of Request
Echo ' name: '. $_request[' name ']. '
'; The value of the request parameter
?>
I hope this article is helpful to everyone's PHP programming.
PHP predefined variables how to output such as this $_server[' Server_ador ']
?
echo--Just fine ~
If you want to see all the variables under the $_server
echo "
Var_dump ($_server);
What are some of the predefined global array variables commonly used in PHP? php provides a number of predefined variables. Because many variables depend on the version and settings of the server that is running, and other factors, no detailed documentation is provided. Some of the predefined variables do not take effect when PHP is run as a command line. The commonly used predefined array variables are $_post,$_get,$_request,$_cookie,$_session,$_server and so on, specifically you can refer to the PHP manual, which is clearly written.
http://www.bkjia.com/phpjc/907843.html Span id= "Indexurl" itemprop= "Indexurl" >www.bkjia.com true http://www.bkjia.com/phpjc/907843.html techarticle php several pre-defined variables $_server usage summary, _server Summary The usage of several predefined variables $_server in PHP is summarized in this paper. Share to everyone for your reference. The following: Replication generation ...