我们
![](/icons/82868de.gif)
![](/icons/82868chengxu.gif)
![](/icons/82868de.gif)
原网站WebSite访问地址是 http://www.phpweblog.net/test.php?a=1&b=2&c=3
使用了 mode_rewrite
![](/icons/82868hanshu.gif)
![](/icons/82868chengxu.gif)
function mod_rewrite
![](/icons/82868kh.gif)
![](/icons/82868if.gif)
![](/icons/82868set.gif)
$url = substr ( $_SERVER [ ’ PATH_INFO ’ ] , 1 );
$url = explode ( ’ / ’ , $url );
foreach ( $url as $key => $value ){
![](/icons/82868if.gif)
![](/icons/82868if.gif)
$query
![](/icons/82868string.gif)
![](/icons/82868zhk2.gif)
}
}
$_SERVER [ ’ QUERY_STRING ’ ] = implode ( \" & \" , $query
![](/icons/82868string.gif)
$_SERVER [ ’ PHP_SELF ’ ] = substr ( $_SERVER [ ’ PHP_SELF ’ ]
, 0 , strpos ( $_SERVER [ ’ PHP_SELF ’ ] , ’ .php ’ ) + 4 );
$_SERVER [ ’ REQUEST_URI ’ ] = $_SERVER [ ’ PHP_SELF ’ ]
. ’ ? ’ . $_SERVER [ ’ QUERY_STRING ’ ];
}
}
mod_rewrite
![](/icons/82868kh.gif)
http : // www.phpweblog.net/test.php/a/1/b/2/c/3
echo ’ <pre> ’ ;
echo \" GET
![](/icons/82868shuzu.gif)
pr
![](/icons/82868int.gif)
Array
(
[a] => 1
[b] => 2
[c] => 3
)
最新评论