#1 redguan
// 在使用PATH_INFO的情况下,对路由进行预处理
if(TRUE == $GLOBALS['G_SP']['url']["url_path_info"] && !empty($_SERVER['PATH_INFO'])){
$url_args = explode("/", $_SERVER['PATH_INFO']);$url_sort = array();
for($u = 1; $u < count($url_args); $u++){
if($u == 1)$url_sort[$GLOBALS['G_SP']["url_controller"]] = $url_args[$u];
elseif($u == 2)$url_sort[$GLOBALS['G_SP']["url_action"]] = $url_args[$u];
else {$url_sort[$url_args[$u]] = isset($url_args[$u+1]) ? $url_args[$u+1] : "";$u+=1;>
if("POST" == strtoupper($_SERVER['REQUEST_METHOD'])){$_REQUEST = $_POST = $_POST + $url_sort;
}else{$_REQUEST = $_GET = $_GET + $url_sort;}
}
2010-10-22 10:52:32