我在文件夹中制作了一个控制器,但收到此错误
404 Page Not Found
The page you requested was not found.
folder
控制者/管理员 -测试.php
这是控制器
<?php
class Test extends CI_Controller {
public function index(){
echo 'hello';
}
function hello() {
echo 'world';
}
}
?>
这是路线
$route['admin'] = 'admin/test';
使用以下代码:
路线:
$route['admin'] = 'admin/test/index';
控制器:
<?php
class Test extends CI_Controller {
public function index(){
echo 'hello';
}
function hello() {
echo 'world';
}
}
?>