These arrays are very special and they take effect globally, for example, automatically within any range. Therefore, it is usually called autoglobals or superglobals ). CopyCodeThe Code is as follows: <? PHP
$ A = "php tutorial network ";
Echo "Get the variable value through \ $ globals:". $ globals ['a'];
// Output: Get the variable value through $ globals: PhP tutorial Network
Echo "<br/> ";
Echo "File Name of the script being executed:". $ _ server ['php _ Self '];
// Output: File Name of the script being executed:/study_php/2-3.php
Echo "<br/> ";
Echo "root directory of the script being executed:". $ _ server ['document _ root'];
// Output: the root directory of the script being executed: H:
Echo "<br/> ";
Echo "absolute path of the script being executed:". $ _ server ['script _ filename'];
// Output: the absolute path of the script being executed: H:/study_php/2-3.php
?>
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