砍敺 IT_man 2015-7-3 10:55 蝺刻摩 ' W- a6 k; A' B6 R- ^4 C0 m; r
. ]4 W+ u6 E+ R' B4 T" y' N1 r+ a PHP 銝剖敺桀蝬脣孵臭誑 $_SERVER 蝯孵敺嚗璅孵蝔敺格暺暻餌抬銝雿輻刻絲靘蝞貊嗥陛殷擐靘隤霅撟曉撣貊典啁 $_SERVER1 t6 t6 }. i, S8 i
! z j( B! m" s6 N; W% y$_SERVER['HTTP_HOST']
, E5 y1 o, N+ E3 B) `# ]$_SERVER['REQUEST_URI']* g( {& R1 D& `# U% O
$_SERVER['PHP_SELF']
& W4 t$ i: K: x8 Y) J% c+ e+ ]$_SERVER['QUERY_STRING']5 t' s6 `# Y. z5 ?; x/ }9 W
g" [0 c( z3 q8 w g% t閮剜蝬脣 http://www.av4u.info/test.php?tid=129 }/ a# P5 u2 F# p
% S2 ?$ ]4 k) E f) s9 N5 a" t隞乩 $_SERVER 仿*蝷箇
7 Q) P5 o) y" {& ~9 z/ V( d& t% g+ J% h6 s. |7 ?0 }9 `" i& \
echo $_SERVER['HTTP_HOST'];//憿舐內 www.av4u.info
$ e/ z4 B5 l; b1 ~- \/ f9 [echo $_SERVER['REQUEST_URI'];//憿舐內 /test.php?tid=120 o- R! B" P' Y/ H4 n% P
echo $_SERVER['PHP_SELF'];//憿舐內 /test.php
1 R( {+ J& R- A3 ^$ eecho $_SERVER['QUERY_STRING'];//憿舐內 tid=12! H0 `+ k* }$ K* ^
* c- D: s! r0 Z. X( C6 e' j* ]
撟曉 $_SERVER嚗撌脩敺鈭蝬脣典嚗亥撠望舀蝬脣蝯衣韏瑚$URL='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];$ H, G7 Q k- M
echo $URL;$ [' ?# g" ^. }" Y
璅撠勗臭誑拙敺曉函蝬脣嚗芣臬蝪∪桃蝭靘撌莎憒蝬脣蝯瑽頛箄嚗臭誑隤輻冽游 $_SERVER 靘敺閰喟敦典嚗隢 php.net $_SERVER 隞蝝嫘
# Y5 e& c$ p) v4 _, o' |2 ]/ a: L) r& I/ Y& @3 O+ Z/ F
; K+ b F4 n2 O8 P4 r4 b
PHP : $_SERVER - Manual
! |: m- y3 ?4 W v: }1 J: i7 nhttp://php.net/manual/en/reserved.variables.server.php! T3 b5 X9 A% Y. A7 _, p# Q6 l
|
|