I have created a controller named Sign
and I have run the controller using this link:
http://localhost/ci/index.php/sign .
But it is giving 404 error
.
My controller name is: Sign.php
and below is code:
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Sign extends CI_Controller {
public function __construct()
{
parent::__construct();
}
public function index()
{
echo "1";
}
}
Please help me to find the error.....
Default page is working fine. But if I change $route['default_controller'] = 'Sign';
then also 404 error
我遇到了同样的问题,并解决了问题,在您的情况下以大写的第一个字母调用控制器(Sign.php)
You should use following url. Controller names are case sensitive
http://localhost/ci/index.php/Sign
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.