在controller里判断提交是不是通过post方式:
if(Yii::$app->request->isPost){
return true;
}else{
return false;
}判断get提交
if(Yii::$app->request->isGet){
return true;
}else{
return false;
}
上一篇:swoole框架怎么安装
下一篇:vscode如何添加插件