Commonly used global variables in php

WBOY
Release: 2016-07-29 08:58:21
Original
1147 people have browsed it

echo $_SERVER['PHP_SELF'],'
'; //The address of this page
echo $_SERVER['HTTP_REFERER'],'
';//Link to the previous page of the current page The address of
echo $_SERVER['SCRIPT_FILENAME'],'
'; //The absolute path of the current script
echo $_SERVER['REMOTE_ADDR'],'
'; //The IP address of the client
echo $_SERVER['QUERY_STRING'],'
';//Query string,? The following part
echo $_SERVER['DOCUMENT_ROOT'],'
'; //Document root directory
echo $_SERVER['SERVER_ADDR'],'
';//Server's ip

The above introduces the commonly used global variables in PHP, including related content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!