yii 提交表單報400錯誤,提示 「您提交的數據沒法驗證」,問題處理。

正確作法:web

 Add this in the head section of your layout:this

  <?= Html::csrfMetaTags() ?>spa


不推薦的作法,如下作法是取消CSRF令牌驗證code

Add this in your controller:orm

public $enableCsrfValidation = false;csrf

相關文章
相關標籤/搜索