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

相关文章
相关标签/搜索