Home >PHP Framework >YII >How does yii determine whether it is an ajax submission?
The method to determine whether it is an ajax submission is as follows:
(Related tutorials recommended: yii framework)
public function actionDelete() { if (Yii::$app->request >isAjax) { // request is ajax request } else { // not ajax request // for example redirect } }
More To learn programming-related content, you can follow the Programming Tutorial column on the PHP Chinese website!
The above is the detailed content of How does yii determine whether it is an ajax submission?. For more information, please follow other related articles on the PHP Chinese website!