CIURL can be defined in this way. The final result of this post is "controller & nbsp;: & nbsp; apimethod & nbsp;": & nbsp; in this method, I want to use GET to pass a parameter. the URL is as follows. if the result is not correct, the error 404 is returned. This is why the localhost CI URL cannot be defined as follows.
This post was last edited by wdvill at 02:57:39 on
Controller: api
Method: index
In this method, I want to use GET to pass a parameter. the URL is as follows. The result is not acceptable and error 404 is returned. why?
Http: // localhost/codeigniter/index. php/api/index? Param = 12
But I put? After the number is removed
Http: // localhost/bubblewitch/index. php/api/index
But I want to input the parameter.
You can use http: // localhost/codeigniter/index. php/api/index/param/12
But I don't want this.
I asked if I want to use the first tape? In the CI framework, there is a way to achieve
------ Solution --------------------
The routing function is used in CI, that is, the route under the config file of the user. set your own routing rules in php. you can see $ route ['thumb/(: any) '] = "category/thumb/$1"; can this array be adjusted, become the way you want