CI3.0路由问题
$config['enable_query_strings'] = true;,设置这里后既然无法使用$route['default_controller'] = 'site';设置了这里,既然无法默认显示报错,Unable to determine what should be displayed. A default route has not been specified in the routing file.
必须得要index.php?c=site&m=index地址才行访问,无法设置默认路由
CI3.0尼玛好垃圾,经常有问题,没YII2.0成熟,稳定啊
windows真垃圾 连个WOW都不带还得自己下载安装申请号练级 CI 目錄下寫一個 index.html
<html>
<head>
<meta http-equiv="Refresh" content="0;URL=index.php?c=index">
</head>
<body>
</body>
</html>
在system\core\Router.php Function _set_routing()内将下面的代码提前放到这个函数内的前面:
// Load the routes.php file.
if (file_exists(APPPATH.'config/routes.php'))
{
include(APPPATH.'config/routes.php');
}
if (file_exists(APPPATH.'config/'.ENVIRONMENT.'/routes.php'))
{
include(APPPATH.'config/'.ENVIRONMENT.'/routes.php');
}
// Validate & get reserved routes
if (isset($route) && is_array($route))
{
isset($route['default_controller']) && $this->default_controller = $route['default_controller'];
isset($route['translate_uri_dashes']) && $this->translate_uri_dashes = $route['translate_uri_dashes'];
unset($route['default_controller'], $route['translate_uri_dashes']);
$this->routes = $route;
} 哎,升级反而问题多了 这个算不算是bug,我把楼上代码放进去果然OK了,谢谢,哎,看来CI3.0还需继续更新版本啊,bug不少
页:
[1]