qq260101081
我也遇到了这个问题,按这方法果然解决了,3Q分享
- qq260101081 赞了回复
解决方案如下:
(关键)
示例代码中,加密解密类的实例创见通过 Class 同名方法 的方式创建。
public function
WXBizMsgCrypt
($token, $encodingAesKey, $appId)
{
$this->token = $token;
$this->encodingAesKey = $encodingAesKey;
$this->appId = $appId;
}在YII或者laravel中,对Class类的实例构建需要通过构造函数 __construct()创建。
public function
__construct
($token, $encodingAesKey, $appId)
{
$this->token = $token;
$this->encodingAesKey = $encodingAesKey;
$this->appId = $appId;
}不止一处,其他用到的子类也有这个现象,挨个改改吧。
(建议) 示例代码中,使用的是include_once加载,更新成namespace ... use 的方式会更合理;
(补充) 示例代码中,pkcs7Encoder这个文件中包含了两个Class,如果真正使用,建议拆分成俩文件…… - qq260101081 赞了回答
求解绝对路径的配置方法
'imagePathFormat' => "D://phpStudy/WWW/yii/ecshop/api/web/uploads/images/{time}{rand:6}",
用这个上传不了 - qq260101081 回复了 frans 的评论
后端配置项没有正常加载,上传插件不能正常使用!
actions中加了 upload 还是不行 求解!
chrome F12 提示错误如下:
GET http://admin.com/index.php?r=article/upload&action=config&&noCache=1437702912506 500 (Internal Server Error) ueditor.all.js:8092
请求后台配置项http错误,上传功能将不能正常使用!
感谢大神回答!
我报这个错
"NetworkError: 500 Internal Server Error - http://localhost/yii2/backend/web/index.php?r=pages%2Fpages%2Fupload&action=uploadimage&encode=utf-8",
为什么上传路径不正确?
- qq260101081 赞了评论
后端配置项没有正常加载,上传插件不能正常使用!
actions中加了 upload 还是不行 求解!
chrome F12 提示错误如下:
GET http://admin.com/index.php?r=article/upload&action=config&&noCache=1437702912506 500 (Internal Server Error) ueditor.all.js:8092
请求后台配置项http错误,上传功能将不能正常使用!
感谢大神回答!
- qq260101081 赞了评论
发现有问题,值是0的时候会输出空,还有记录少了导出也有问题
这样写不行?where(['<','category','sell'])