$ _ SERVER [& # x27; PHP_SELF & # x27;] what does this sentence mean? What is the role of this sentence? If (strpos ($ _ SERVER [PHP_SELF], $ url) & nbsp; false) {return & nbsp; false ;} $ _ SERVER [PHP_SELF] what does this sentence mean? What is the role of this sentence? $ _ SERVER ['php _ SELF '] what does this sentence mean? What is the role of this sentence?
If (strpos ($ _ SERVER ['php _ SELF '], $ url) = false)
{
Return false;
}
$ _ SERVER ['php _ SELF '] what does this sentence mean? What is the role of this sentence?
Share: More
------ Solution --------------------
It is used to reference the current webpage address. it is a global variable automatically generated by the system. this code indicates the position where the variable $ url appears for the first time. if it does not exist, return false;
------ Solution --------------------
Upstairs !!
------ Solution --------------------
SELF itself
$ _ SERVER ['php _ SELF '] location of the current PHP program on the website
------ Solution --------------------
The file name of the currently executed script, which is related to document root. For example, using $ _ SERVER ['php _ SELF '] in a script with the address of the http://example.com/test.php/foo.bar will get/test. PHP/foo. bar. The _ FILE _ constant contains the complete path and FILE name of the current (such as include) FILE. Starting from PHP 4.3.0, if PHP runs in command line mode, this variable will contain the script name. The variable is unavailable in earlier versions.
------ Solution --------------------
Reference:
It is used to reference the current webpage address. it is a global variable automatically generated by the system. this code indicates the position where the variable $ url appears for the first time. if it does not exist, return false;
Good. The Manual looks good.
------ Solution --------------------
Displays the relative path of the current php file's website