每次,当我尝试在 CodeIniter 中添加新控制器时,都会得到以下信息:
404页面不存在
未找到您所请求的页面。
汽车管理员.php:
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Carsadmin extends Base_Controller {
public function index(){
echo 'Hello World!';
}
}
任何想法为什么会发生这种情况?我需要更改路由文件吗?
$route['default_controller'] = "welcome";
$route['404_override'] = '';
$route['^(en|ar|ru)/pages/(.+)$'] = 'pages/index/$2';
$route['^(en|ar|ru)/profile/([0-9]+)$'] = '/profile/index/$2';
$route['^(en|ar|ru)/admin$'] = 'admin/dashboard';
$route['^(en|ar|ru)/(.+)$'] = "$2";
$route['^(en|ar|ru)$'] = $route['default_controller'];