url = 'http://www.5idev.com/php/index.php/test/foo?username=hbolive'

php 获取$_SERVER信息

$_SERVER['PHP_SELF'] 得到:/php/index.php/test/foo 得到当前正在执行脚本的文件名

$_SERVER['SCRIPT_NAME'] 得到:/php/index.php 包含当前脚本的路径

$_SERVER['REQUEST_URI'] 得到:/php/index.php/test/foo?username=hbolive 访问此页面所需的URI

$_SERVER['QUERY_STRING'] 得到查询字符串username=hbolive