Home > Article > Backend Development > The php script path is unclear. The php script is unclear_PHP tutorial
I won’t go into small talk, but I’ll just ask today’s question. To be precise, to many A similar distinction between global variables and constants related to the current script information.
Paste the code first:
<?<span>php </span><span>echo</span> <span>$_SERVER</span>['PHP_SELF'<span>]; </span><span>echo</span> "<hr/>"<span>; </span><span>echo</span> <span>__FILE__</span><span>; </span><span>echo</span> "<hr/>"<span>; </span><span>echo</span> <span>$_SERVER</span>['SCRIPT_FILENAME'<span>]; </span><span>echo</span> "<hr/>"<span>; </span><span>echo</span> <span>$_SERVER</span>['REMOTE_ADDR'<span>]; </span><span>echo</span> "<hr/>"<span>; </span><span>echo</span> <span>$_SERVER</span>['QUERY_STRING'<span>]; </span><span>echo</span> "<hr/>";
The address in the browser is http://localhost/test/test4.php?a=3 localhost is the root directory.
Looking at it now, it turns out that the monk Zhang Er was really confused after taking a closer look.
Posting the results, no need to explain much, I believe many people will understand it at a glance.