Php obtains the php server variable in the current url path.
Programming in php to obtain the current url address and server variables mainly uses the following global variables: $ _ server ["query_string"], $ _ server ["request_uri"], $ _
PHP obtains the path, name, and server path of the file running before the current period. & lt ;? Phpecho displays the relative path and file name of the script file :. $ _ SERVER [PHP_SELF]. & lt; br & gt; echo display the CGI script
PHP obtains the path, name, and server path of the file running before the current period. & lt ;? Phpecho "shows the relative path and file name of the script file :\"". $ _ SERVER ["PHP_SELF"]. "\" & lt; br & gt; "; echo" display the CGI script
Several PHP server architectures are strongly recommended !!! I found a good article and introduced in detail several architectures of the current PHP Server. I specially reprinted it. I strongly recommend it !!? Nginx + PHP + PHP-FPM (FastCGI) on
Php introduction to getting current url path functions and server variables
We will introduce the functions for getting the current url path in php and some server variables in php for your reference.Mainly used: $ _ SERVER ["QUERY_STRING"],
PHP server of several architectures, highly recommended!!!
Found a good article, very detailed introduction of the current PHP server several architectures, specially
Summary of php application path variables. Local server, domain name d.com, root path D: phpnowvhostsd.com. yii, with the requeir_onceaa.php file in the x. php code in the root directory, and aa. php requeir_onceabb.php
Local server, domain
Latest Version:
lnmp-2.5
Update Time:
20140702
MD5 Value:
D4d52e39066f041569b8ef2daa033e15
Installation Instructions:
Please ensure that the server can be normal access to the Internet, yum command can be
The variables included in PHP $ _ SERVER are global variables, which can be called Super global variables. Below I will give you a detailed explanation of common PHP $ _ SERVER usage, hoping to help you.
Frequently used $ _ SERVER [] Variables
$ _
PHP gets the path, name, and server path of the running file before the current period
echo "Displays the relative path and file name of the script file: \" ". $_server[" Php_self "]." \"";echo "Displays the CGI script specification used by the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.