![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
yii2
LeoYang2013
这个作者很懒,什么都没留下…
展开
-
Yii2: the file or directory to be published does not exist bower/jquery/dist
问题执行 yii 的 gii 命令时发生类似如下错误the file or directory to be published does not exist bower/jquery/dist原因出现这一问题的原因是 Composer asset plugin 版本太低,需要升级解决方法参考这里 https://github.com/yiisoft/yii2/blob/master/docs/gui原创 2017-06-30 14:27:23 · 874 阅读 · 0 评论 -
Yii2 RESTful 422 Data Validation Failed.
问题通过 http body post 了有效的 JSON 格式数据,但是服务器返回 422 Data Validation Failed. 错误原因通过调试发现 Yii::$app->getRequest()->getBodyParams() 获取到的 body 为空,幸运地发现,是由于 post 请求的时候没有添加 Content-Type: application/json header,导致原创 2017-07-02 10:13:02 · 1311 阅读 · 0 评论