$url=$_SERVER['REQUEST_URI'];
$route=array();
$route=explode('index.php/', $url);
if ($route[1])
{
$method=array();
$method=explode('/',$route[1]);
if ($method[0]&&file_exists($method[0].'.php'))
{
include $method[0].".php";
$class=new $method[0];
if (method_exists($class,$method[1]))
{
$function=$method[1];
$class->$function;
$i=2;
}
else
{
$class->index();
$i=1;
}
$count=count($method);
for(;$i<=$count;$i+2)
{
$_GET[$method[$i]]=$method[$i+1];

}

}
这样不行的,怎样改进啊