用的是tp5.1官方的
使用参数规则验证触发 "模块不存在:about" 的http异常.
一但注释掉pattern()不验证了才能正常访问.
默认用的是多模块
在config/Route.php增加
// id参数必须是数字规则
Route::get('about/:id', 'index/Home/about')->pattern('id', '\d+');浏览器地址 sss为参数http://syhs.local.com/about/sss.html
------------------------------------------------------------------------
编辑器内和附件上传图片都传不了, 只能复制粘贴了.
[0] HttpException in Module.php line 62
模块不存在:about
$available = true;
}
// 模块初始化
if ($module && $available) {
// 初始化模块
$this->request->setModule($module);
$this->app->init($module);
} else {
throw new HttpException(404, 'module not exists:' . $module);
}
}
// 是否自动转换控制器和操作名
$convert = is_bool($this->convert) ? $this->convert : $this->rule->getConfig('url_convert');
// 获取控制器名
$controller = strip_tags($result[1] ?: $this->rule->getConfig('default_controller'));
$this->controller = $convert ? strtolower($controller) : $controller; 最佳答案