首先我用vue上传阿里图片用的是分片上传,分片上传由于一片是以100kb为起始的,所以当图片大小小于100kb的时候不分片,可以正常上传,当大于100kb的时候,会报400错误如下 One or more of the specified parts could not be found or the specified entit 当报这个错误时你要去登录阿里后台设置一下 文档地址:https://help.aliyun.com/document_detail/32069.htm exopos…
出现400错误是yii2.0的csrf防范策略导致 在components里面添加request配置如下: 'request' => [ // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation 'cookieValidationKey' => '83r5HbITBiMfmiYPOZFdL-raVp4O1VV4', 'enableCookieValid…
Yii的action可以带参数,比如: class PostController extends CController { public function actionCreate($category, $language='en') { $category=(int)$category; // ... fun code starts here ... } } 这样确实很方便.不过,这默认只从$_GET中提取参数的.如果是post请求,就会报400错误. 如果想使用其他类型的请求参数,可以重写…