砍敺 IT_man 2015-7-3 10:55 蝺刻摩 9 K D' x3 f% ~/ W. u# H
+ y9 s; | q& G3 Q7 p PHP 銝剖敺桀蝬脣孵臭誑 $_SERVER 蝯孵敺嚗璅孵蝔敺格暺暻餌抬銝雿輻刻絲靘蝞貊嗥陛殷擐靘隤霅撟曉撣貊典啁 $_SERVER# N- C5 L9 L* V" U% C
. P) a' K/ i* |' ?
$_SERVER['HTTP_HOST']
& y. X% O, o0 t/ a# n$_SERVER['REQUEST_URI']7 G7 W/ G% }: r2 q
$_SERVER['PHP_SELF']* P) X' P8 t, |+ J/ G3 L/ ^+ l" Y
$_SERVER['QUERY_STRING']; T0 L( ^% i1 B* q* B9 R9 D
( A6 s: b) S$ ]8 _閮剜蝬脣 http://www.av4u.info/test.php?tid=120 U6 Z: C. h. X& n) T0 T) G
; M1 y. B [/ X隞乩 $_SERVER 仿*蝷箇, l! t$ `/ k9 t$ z* l( z+ R
& e: h, r c! ?8 a S+ \3 a+ r! |echo $_SERVER['HTTP_HOST'];//憿舐內 www.av4u.info
0 p [8 `; P4 f* L' Vecho $_SERVER['REQUEST_URI'];//憿舐內 /test.php?tid=12* ]4 q' K2 @! ^6 B
echo $_SERVER['PHP_SELF'];//憿舐內 /test.php
* f. C: t: y% c# N6 k1 Vecho $_SERVER['QUERY_STRING'];//憿舐內 tid=120 O% L( N5 T7 y, j) Z7 |; a, R
( Q3 y. W0 s1 z0 X5 n7 z撟曉 $_SERVER嚗撌脩敺鈭蝬脣典嚗亥撠望舀蝬脣蝯衣韏瑚$URL='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
5 B+ @! t* c0 j1 W/ l! I% `4 l1 a# recho $URL;+ _* T T w6 p
璅撠勗臭誑拙敺曉函蝬脣嚗芣臬蝪∪桃蝭靘撌莎憒蝬脣蝯瑽頛箄嚗臭誑隤輻冽游 $_SERVER 靘敺閰喟敦典嚗隢 php.net $_SERVER 隞蝝嫘' R9 {0 v; b/ \5 t% ]
' y* X9 n8 B Y$ u
" i) M5 _* |: a4 _PHP : $_SERVER - Manual
( H. S1 D+ {8 u5 x/ p2 y( `http://php.net/manual/en/reserved.variables.server.php4 B* b" I0 K2 x+ n, O* T8 S! H
|
|