3.1.2 - 严重 - 未处理
遇到一个问题不知道是框架问题 还是自己写的程序问题 一直找不到原因
如图所示
//空操作
public function _empty(){
$this->dispath();
}
public function dispath(){
$url = $_SERVER['PATH_INFO'];
$ary = explode('/', $url);
$rewrite = urldecode($ary[1]);
$r = D("Router")->where("rewrite='".$rewrite."'")->getField('url');
if($r){
$exp = explode('/', $r);
R('Home/'.ucfirst($exp[0]).'/'.$exp[1]);
}else{
$this->redirect("index/index");
}
}这是我的EmptyAction代码 项目分组 此EmptyAction在Home里
URL为localhost/mycode/index.php/xxx-bbb-ccc
就出现错误 无法加载模块:
但是如果URL为localhost/mycode/index.php/xxxbbbccc以及localhost/mycode/index.php/xxx_bbb_ccc
是没有问题可以正常显示 为什么加了一横就出现无法加载模块问题。一直没找到原因!问题出错提示太少,找不到哪里出错
下面附上正常显示代码


希望高手或者官方给个解答
