Codeigniter routing is not familiar with codeigniter. especially for routing. now we need to change the system. the "route_error" error always occurs when accessing the controller written by myself. for example, I wrote a login. the php controller is stored in the controllers/admin Directory. when I access www.abc.com/admin/logindirectly, the routing problem of the specified rout codeigniter is displayed.
I am not familiar with codeigniter, especially routing. now I want to change the system. after I write my own controller, there will always be a "route_error" error during access;
For example, if I write a login. php controller and put it in the controllers/admin directory, the "route_error." error will occur when I directly access www.abc.com/admin/login.
If I add a line to route. php:
$ Route ['admin'] = "admin/login ";
In this way, you can. But it's too troublesome. I can't modify route. php every time I write a controller, right ?!
The following is my route. php file. I don't understand what I used to mean. let's take a look at how to set it so that I can write my controller normally without affecting the previous usage:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.