Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined function Qiniu\Http\Middleware\compose() #417

Closed
wds7788 opened this issue Aug 3, 2023 · 3 comments · Fixed by #418
Closed

Call to undefined function Qiniu\Http\Middleware\compose() #417

wds7788 opened this issue Aug 3, 2023 · 3 comments · Fixed by #418
Labels
bug Something isn't working.

Comments

@wds7788
Copy link

wds7788 commented Aug 3, 2023

报错提示,Call to undefined function Qiniu\Http\Middleware\compose()
sdk版本"qiniu/php-sdk": "^7.9"
image

@wds7788
Copy link
Author

wds7788 commented Aug 3, 2023

php版本8.0

@wds7788
Copy link
Author

wds7788 commented Aug 4, 2023

安装方式
composer require qiniu/php-sdk

代码片段

/**

  • 获取房间人数
  • @param string $roomName 操作所查询的连麦房间
  • @return array
    */
    public function getListUserDev($roomName)
    {
    $AppClient = new AppClient($this->auth);
    list($ret, $err) = $AppClient->listUser($this->appid, $roomName);
    $count = 0;
    if (isset($ret['users']) && $ret['users']) {
    $count = count($ret['users']);
    }
    return compact('count');
    }

@wds7788
Copy link
Author

wds7788 commented Aug 4, 2023

thinkphp6.1
在index.php入口文件手动

  require_once __DIR__ . '/vendor/autoload.php';
+ require_once __DIR__ . '/vendor/qiniu/php-sdk/src/Qiniu/Http/Middleware/Middleware.php';

暂时解决问题

@lihsai0 lihsai0 added the bug Something isn't working. label Aug 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants