一、在controller里判断提交是不是通过post方式:
if(Yii::$app->request->isPost){ return true; }else{ return false; }
上一篇:vscode中设置js文件字体显示白色的方法
下一篇:yii2框架实现注册的方法