λͺ©μ°¨
phpλΏλ§ μλλΌ μΉνλ‘κ·Έλλ°μ νλ€λ³΄λ©΄ μλ²νκ²½μ΄λ μ¬μ©μμ μ¬μ©νκ²½ μ 보λ₯Ό μλ²μ¬μ΄λμμ μμ§ν νμκ° μμ λκ° μλ€.
phpμμλ λΉμ°ν μλ²νκ²½μ΄λ μ¬μ©μνκ²½ μμ»¨λ° μ μμμ μμ΄νΌμ£ΌμλΌλ μ§,
μλ°μ€ν¬λ¦½νΈμ USER_Agentμ κ°μ μ 보λ€μ μμ§ν μ μλ ν¨μλ€μ΄ λ§λ ¨λμ΄ μλ€.
μ΄λ₯Ό ν΅μΉν΄μ μλ²ν¨μλΌ μΉνκ³
phpμμλ $_SERVERμ λ°°μ΄ ννλ‘ μΈ μ μλ€.
μ¬μ© μμ λ€μ λ€μκ³Ό κ°λ€.
μ€μ λμ λ°λͺ¨νμ΄μ§λ μ΄ κ³³μ ν΄λ¦.
$_SERVER['DOCUMENT_ROOT'] = μ¬μ΄νΈκ° νμ¬ μμΉν μλ²μμ ν΄λ μμΉ = /home/hosting_users/rsl2_stspace/www
$_SERVER['SCRIPT_FILENAME'] = μ€νλκ³ μλ phpλ¬Έμμ μμΉμ νμΌλͺ = /home/hosting_users/rsl2_stspace/www/port/demo/php/d_php_$_SERVER.php
$_SERVER['SERVER_NAME'] = νμ¬ μ΄λ¬Έμκ° μ€νμ€μΈ μ¬μ΄νΈ λλ©μΈ = cafe75.kr
$_SERVER['SERVER_PORT'] = μ¬μ΄νΈμ μΉμλ²κ° μ¬μ©νλ ν¬νΈ = 80
$_SERVER['SERVER_SOFTWARE'] = μλ²μΈ‘μ μννΈμ¨μ΄μ μΈ νκ²½ = Apache
$_SERVER['GATEWAY_INTERFACE'] = μλ²μ CGI μ 보 = CGI/1.1
$_SERVER['SERVER_PROTOCOL'] = μ¬μ©λ μΉμλ²μ HTTP νλ‘ν μ½ = HTTP/1.1
$_SERVER['REQUEST_URI'] = νμ¬νμ΄μ§μ μ£Όμμμ λλ©μΈμ μ μΈν μ 보 = /port/demo/php/d_php_$_SERVER.php
$_SERVER['PHP_SELF'] = νμ¬νμ΄μ§μ μ£Όμμμ λλ©μΈκ³Ό λ겨μ§λ νλΌλ―Έν° κ°μ μ μΈν μ 보 = /port/demo/php/d_php_$_SERVER.php
$_SERVER['APPL_PHYSICAL_PATH'] = νμ¬ μ€νμ€μΈ νμ΄μ§μ μ€μ νμΌ κ²½λ‘=
$_SERVER['HTTP_ACCEPT_ENCODING'] = νμ¬ λ¬Έμμ μΈμ½λ© λ°©μ = gzip, deflate
$_SERVER['HTTP_ACCEPT_LANGUAGE'] = νμ¬ λ¬Έμμ μΈμ΄ = ko-KR
$_SERVER['HTTP_USER_AGENT'] = μ¬μ΄νΈμ μ μν μ¬μ©μ νκ²½ = Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
$_SERVER['REMOTE_ADDR'] = μ¬μ΄νΈ μ μν μ¬μ©μ IP = 121.167.42.135
μ λ΄μ©μ PHPμμ€
<p> </p>
<p> $_SERVER['DOCUMENT_ROOT'] = μ¬μ΄νΈκ° νμ¬ μμΉν μλ²μμ ν΄λ μμΉ =
<?=$_SERVER['DOCUMENT_ROOT']?>
</p>
<p> $_SERVER['SCRIPT_FILENAME'] = μ€νλκ³ μλ phpλ¬Έμμ μμΉμ νμΌλͺ
=
<?=$_SERVER['SCRIPT_FILENAME'] ?>
</p>
<p> $_SERVER['SERVER_NAME'] = νμ¬ μ΄λ¬Έμκ° μ€νμ€μΈ μ¬μ΄νΈ λλ©μΈ =
<?=$_SERVER['SERVER_NAME']?>
</p>
<p> $_SERVER['SERVER_PORT'] = μ¬μ΄νΈμ μΉμλ²κ° μ¬μ©νλ ν¬νΈ =
<?=
$_SERVER['SERVER_PORT']?>
</p>
<p> $_SERVER['SERVER_SOFTWARE'] = μλ²μΈ‘μ μννΈμ¨μ΄μ μΈ νκ²½ =
<?=$_SERVER['SERVER_SOFTWARE']?>
</p>
<p> $_SERVER['GATEWAY_INTERFACE'] = μλ²μ CGI μ 보 =
<?=$_SERVER['GATEWAY_INTERFACE']?>
</p>
<p> $_SERVER['SERVER_PROTOCOL'] = μ¬μ©λ μΉμλ²μ HTTP νλ‘ν μ½ =
<?=$_SERVER['SERVER_PROTOCOL']?>
</p>
<p> $_SERVER['REQUEST_URI'] = νμ¬νμ΄μ§μ μ£Όμμμ λλ©μΈμ μ μΈν μ 보 =
<?=$_SERVER['REQUEST_URI']?>
</p>
<p> $_SERVER['PHP_SELF'] = νμ¬νμ΄μ§μ μ£Όμμμ λλ©μΈκ³Ό λ겨μ§λ νλΌλ―Έν° κ°μ μ μΈν μ 보 =
<?=$_SERVER['PHP_SELF']?>
</p>
<p> $_SERVER['APPL_PHYSICAL_PATH'] = νμ¬ μ€νμ€μΈ νμ΄μ§μ μ€μ νμΌ κ²½λ‘=
<?=$_SERVER['APPL_PHYSICAL_PATH']?>
</p>
<p> $_SERVER['HTTP_ACCEPT_ENCODING'] = νμ¬ λ¬Έμμ μΈμ½λ© λ°©μ =
<?=$_SERVER['HTTP_ACCEPT_ENCODING']?>
</p>
<p> $_SERVER['HTTP_ACCEPT_LANGUAGE'] = νμ¬ λ¬Έμμ μΈμ΄ =
<?=$_SERVER['HTTP_ACCEPT_LANGUAGE']?>
</p>
<p> $_SERVER['HTTP_USER_AGENT'] = μ¬μ΄νΈμ μ μν μ¬μ©μ νκ²½ =
<?=$_SERVER['HTTP_USER_AGENT']?>
</p>
<p> $_SERVER['REMOTE_ADDR'] = μ¬μ΄νΈ μ μν μ¬μ©μ IP =
<?=$_SERVER['REMOTE_ADDR']?>
</p>
<p> </p>
지방
λκΈ