砍敺 IT_man 2015-7-3 10:55 蝺刻摩 : ?* t( c! X/ ^& w; F' `% f
3 g, v, G1 M. B! v7 P# L2 n
PHP 銝剖敺桀蝬脣孵臭誑 $_SERVER 蝯孵敺嚗璅孵蝔敺格暺暻餌抬銝雿輻刻絲靘蝞貊嗥陛殷擐靘隤霅撟曉撣貊典啁 $_SERVER
8 X5 ^1 e& a0 J4 I6 j7 d' a& G! V4 b0 ~) w! G8 E: b5 U
$_SERVER['HTTP_HOST']
8 z2 J" R! _* I- @- g" U! i0 L$_SERVER['REQUEST_URI']/ t7 F1 ^7 q) C# l/ v
$_SERVER['PHP_SELF']
! }8 B4 D6 S2 ]1 A3 o% @$_SERVER['QUERY_STRING']0 o) x8 O; i @( D6 h7 f
! H% g) h, ~; D; \4 Q4 W1 ? L閮剜蝬脣 http://www.av4u.info/test.php?tid=121 X9 V# r* C W$ P5 \
! h% x% s# a ~* d- B5 \隞乩 $_SERVER 仿*蝷箇
# D# B1 T# V% T% O4 y! e, `" H# c9 y$ C
echo $_SERVER['HTTP_HOST'];//憿舐內 www.av4u.info
- i$ i( B- Z* B' }" a: becho $_SERVER['REQUEST_URI'];//憿舐內 /test.php?tid=12
) W0 K8 C' ]& ~" w Xecho $_SERVER['PHP_SELF'];//憿舐內 /test.php$ X9 L' ^8 J5 C- J
echo $_SERVER['QUERY_STRING'];//憿舐內 tid=122 s4 ~7 |% [0 ~: v& z, P5 U, h1 M
6 K5 P0 r( r4 a6 U9 R2 `撟曉 $_SERVER嚗撌脩敺鈭蝬脣典嚗亥撠望舀蝬脣蝯衣韏瑚$URL='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];( w" T& K( Z6 p) o5 b' ]* s
echo $URL;. N6 ~! b+ H- ?0 ^8 z
璅撠勗臭誑拙敺曉函蝬脣嚗芣臬蝪∪桃蝭靘撌莎憒蝬脣蝯瑽頛箄嚗臭誑隤輻冽游 $_SERVER 靘敺閰喟敦典嚗隢 php.net $_SERVER 隞蝝嫘+ F2 { O2 ?3 d6 {
) Z7 S- d! E9 Q3 s/ t% T" b. n9 S
; t: X" F. L' R, nPHP : $_SERVER - Manual
- [% N, h6 A: W# C2 V# phttp://php.net/manual/en/reserved.variables.server.php+ z" |1 F4 s: E/ a8 C
|
|