$_server 변수
루크를 가야할 경우 다음과 같이 $_SERVER['DOCUMENT_ROOT'] 로 루트 표현..
include_once $_SERVER['DOCUMENT_ROOT']."/common/common.php";
$_SERVER['HTTP_HOST'] | 도메인명.. domain.com |
$_SERVER['REQUEST_METHOD'] | GET |
$_SERVER['PHP_SELF'] | /php.php |
$_SERVER['SCRIPT_NAME'] | /php.php |
$_SERVER['REQUEST_URI'] | /php.php |
$_SERVER['SCRIPT_FILENAME'] | /web/home/user/html/php.php |
$_SERVER['DOCUMENT_ROOT'] | /web/home/user/html 루트 절대경로 |
$_SERVER['REMOTE_ADDR'] | 111.111.111.111 |
$_SERVER['REMOTE_HOST'] | |
$_SERVER['REMOTE_PORT'] | 8999 |
$_SERVER['argv'] | |
$_SERVER['argc'] | |
$_SERVER['GATEWAY_INTERFACE'] | CGI/1.1 |
$_SERVER['SERVER_ADDR'] | 112.222.233.222 |
$_SERVER['SERVER_NAME'] | 서버명 |
$_SERVER['SERVER_SOFTWARE'] | Microsoft-IIS/9.0 |
$_SERVER['SERVER_PROTOCOL'] | HTTP/1.1 |
$_SERVER['REQUEST_TIME'] | 1309843171 |
$_SERVER['QUERY_STRING'] | |
$_SERVER['HTTP_ACCEPT'] | text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 |
$_SERVER['HTTP_ACCEPT_CHARSET'] | windows-949,utf-8;q=0.7,*;q=0.3 |
$_SERVER['HTTP_ACCEPT_ENCODING'] | gzip,deflate,sdch |
$_SERVER['HTTP_ACCEPT_LANGUAGE'] | ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4 |
$_SERVER['HTTP_CONNECTION'] | keep-alive |
$_SERVER['HTTP_REFERER'] | |
$_SERVER['HTTP_USER_AGENT'] | Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.112 Safari/534.30 |
$_SERVER['HTTPS'] | |
$_SERVER['SERVER_ADMIN'] | |
$_SERVER['SERVER_PORT'] | 80 |
$_SERVER['SERVER_SIGNATURE'] | Microsoft-IIS/9.0 Server at domain.co.kr in Port 80 |
$_SERVER['PATH_TRANSLATED'] | |
$_SERVER['PHP_AUTH_DIGEST'] | |
$_SERVER['PHP_AUTH_USER'] | |
$_SERVER['PHP_AUTH_PW'] | |
$_SERVER['AUTH_TYPE'] | |
$_SERVER['PATH_INFO'] | |
$_SERVER['ORIG_PATH_INFO'] | [출처] PHP,$_SERVER 변수|작성자 지워진기억들 |
'Web > PHP' 카테고리의 다른 글
php 비교연산자 (0) | 2016.04.26 |
---|---|
phpmyadmin 리스트로 나오는 에러 (3) | 2012.07.31 |
apache2.2 + php5.4 + mysql 세팅 (1) | 2012.07.17 |
[php]문자열 함수 (0) | 2012.06.19 |
[php]시간 함수 사용법 (0) | 2012.06.18 |