砍敺 IT_man 2015-7-3 10:55 蝺刻摩 % c+ J3 k/ K/ l
8 f" R# O5 ]7 w* n6 K; j
PHP 銝剖敺桀蝬脣孵臭誑 $_SERVER 蝯孵敺嚗璅孵蝔敺格暺暻餌抬銝雿輻刻絲靘蝞貊嗥陛殷擐靘隤霅撟曉撣貊典啁 $_SERVER X9 ?7 L4 b1 M0 t: R( Q3 n- C1 V
B8 h% V" @& r+ x, ~$_SERVER['HTTP_HOST']0 @. [) Q" c6 w2 |
$_SERVER['REQUEST_URI']$ F+ X. X" Y8 F1 ^, x7 `/ j! f4 f; o
$_SERVER['PHP_SELF']
, k$ w, W x! b: v; C6 ^' z$_SERVER['QUERY_STRING']
3 E% L9 m5 e" b% a, }" s- W3 P/ ^5 v( k7 q/ j
閮剜蝬脣 http://www.av4u.info/test.php?tid=12; O, i, t @, [; x( H7 ~1 h: `
! k; Z# v# [7 j( u( b
隞乩 $_SERVER 仿*蝷箇# u- [$ B% M2 ~2 d4 o
% y( w' I) C1 x9 ] jecho $_SERVER['HTTP_HOST'];//憿舐內 www.av4u.info
7 p3 i# z7 M/ x/ Wecho $_SERVER['REQUEST_URI'];//憿舐內 /test.php?tid=12( w0 |- s7 Y2 ^" X
echo $_SERVER['PHP_SELF'];//憿舐內 /test.php) s( i7 ]( H2 E( ?
echo $_SERVER['QUERY_STRING'];//憿舐內 tid=12
V' n- ]5 n" B' t* r& }, q9 F
, m' V- R8 ^ b" W撟曉 $_SERVER嚗撌脩敺鈭蝬脣典嚗亥撠望舀蝬脣蝯衣韏瑚$URL='http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];2 W: Y& h5 A. x6 S/ p* P; j
echo $URL;
! Y8 b& s* i# I1 o& L4 Y7 j4 i3 b璅撠勗臭誑拙敺曉函蝬脣嚗芣臬蝪∪桃蝭靘撌莎憒蝬脣蝯瑽頛箄嚗臭誑隤輻冽游 $_SERVER 靘敺閰喟敦典嚗隢 php.net $_SERVER 隞蝝嫘
2 J! @( z' }9 \6 H) W! S% q R6 J8 X# v! T
: {! o" R: y; c: Y0 D$ U* x8 m7 j0 @ rPHP : $_SERVER - Manual$ d j$ T: b/ _# j& c# N- A. S$ k3 {
http://php.net/manual/en/reserved.variables.server.php8 U- G1 S0 b/ x, i% R
|
|