如何路由包含querystring的DooPHP URI?
我需要能够路由在查询字符串中传递信息的请求。例如,假设我的应用程序调用/api/company/delete?id=17。我如何在DooPHP中传递它?我已经定义了一个catchall路由,它正在捕获这个请求,但是我需要能够在没有catchall路由的情况下处理这些请求如何路由包含querystring的DooPHP URI?,doophp,Doophp,我需要能够路由在查询字符串中传递信息的请求。例如,假设我的应用程序调用/api/company/delete?id=17。我如何在DooPHP中传递它?我已经定义了一个catchall路由,它正在捕获这个请求,但是我需要能够在没有catchall路由的情况下处理这些请求 # this doesn't work $route['get']['/api/company/delete?id=:id'] = array('AdminController', 'deletecompany'); # at
# this doesn't work
$route['get']['/api/company/delete?id=:id'] = array('AdminController', 'deletecompany');
# at the bottom of my routes I have this catchall route, which works but it catches --everything--
$route['*']['catchall']['/:id'] = array('HomeController', 'getregions');
我错过了什么明显的东西吗?
$route['get']['/api/company/delete/:id']=array('AdminController','deletecompany')
控制器
$this->params['id']
或
路线
$route['post']['/api/company/delete']=array('AdminController','deletecompany')
控制器
$\u POST['id']