request->isPost)" to determine. If the condition is true, it was submitted by post."/> request->isPost)" to determine. If the condition is true, it was submitted by post.">
Home > Article > PHP Framework > yii2 determines whether it is a post submission form
yii2 Determine whether it is a post submission form
Determine post submission
if(Yii::$app->request->isPost){ return true; }else{ return false; }
Judge get submission
if(Yii::$app->request->isGet){ return true; }else{ return false; }
Recommended: "YII Tutorial"
The above is the detailed content of yii2 determines whether it is a post submission form. For more information, please follow other related articles on the PHP Chinese website!