Php 如何使控制器映射到codeigniter中的POST请求

Php 如何使控制器映射到codeigniter中的POST请求,php,rest,codeigniter-3,php-7,php-5.6,Php,Rest,Codeigniter 3,Php 7,Php 5.6,我想为codeigniter中的控制器分别处理post请求。他们的文档说,您可以在路由名称之后添加http动词来指定类似的内容。 $route['first-route']['GET']=user/first-route 我在我的post申请表中添加了它,但它返回403状态。 这是路线 $route['create_user']['POST']='examples/dummy' 这就是它的功能 public function dummy() { echo 'got this thing

我想为codeigniter中的控制器分别处理post请求。他们的文档说,您可以在路由名称之后添加http动词来指定类似的内容。
$route['first-route']['GET']=user/first-route

我在我的post申请表中添加了它,但它返回403状态。 这是路线

$route['create_user']['POST']='examples/dummy'

这就是它的功能

public function dummy()
 {
    echo 'got this thing';
 }

但当我通过邮递员点击请求或提交表单时,我得到了403响应代码

如果您仍在使用PHP5,我强烈建议尽快升级。不再支持此版本。不,我不是。我使用的是PHP7.3,但仍然无法将控制器映射到post或get方法。为什么要用PHP5标记它?如果您仍然使用PHP5,我强烈建议尽快升级。不再支持此版本。不,我不是。我使用的是PHP7.3,但我仍然无法将控制器映射到post或get方法,为什么要用PHP5标记它?