$ _ SERVER ['php _ SELF '] what does this mean? What role does this sentence play?

Source: Internet
Author: User
$ _ 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

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.