Home > PHP Framework > YII > yii2 determines whether it is a post submission form

yii2 determines whether it is a post submission form

angryTom
Release: 2019-11-06 15:49:15
Original
2959 people have browsed it

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;  
}
Copy after login

Judge get submission

if(Yii::$app->request->isGet){
    return true;
}else{
    return false;  
}
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template