yii 提交表单报400错误,提示 “您提交的数据无法验证”,问题处理。

正确做法:

 Add this in the head section of your layout:

  <?= Html::csrfMetaTags() ?>


不推荐的做法,以下做法是取消CSRF令牌验证

Add this in your controller:

public $enableCsrfValidation = false;


文章来自:http://my.oschina.net/u/873762/blog/493350
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3