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

Class 'OSS\OSSClient' not found #122

Open
getwebtools opened this issue Aug 29, 2019 · 5 comments
Open

Class 'OSS\OSSClient' not found #122

getwebtools opened this issue Aug 29, 2019 · 5 comments

Comments

@getwebtools
Copy link

在windows环境下,使用compser安装类加载一切正常,将其移植到linux环境中(函数计算平台),就出现了Class 'OSS\OSSClient' not found的情况,手动include oss-sdk-php下面的autoload.php也是不行,必须要把/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php手动引入进来才可以,不知道什么问题。

@maclechan
Copy link

如果你不是通过composer下载的SDK,把autoload.php里面的路径打印出来,会发现不对,更改下就好了。

@getwebtools
Copy link
Author

是composer装的

@StartMoney
Copy link

在windows环境下,使用compser安装类加载一切正常,将其移植到linux环境中(函数计算平台),就出现了Class 'OSS\OSSClient' not found的情况,手动include oss-sdk-php下面的autoload.php也是不行,必须要把/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php手动引入进来才可以,不知道什么问题。

兄弟,我终于找到解决办法了,那是因为!!!!!
OSSClient 该是驼峰小写,官方例子里面的 OSSClient 错了!!!

/vendor/aliyuncs/oss-sdk-php/src/OSS/OssClient.php 里的类名是 OssClient

@badandboy
Copy link

window不区分大小写,但是linux区分大小写

@ranshiyang
Copy link

you may use $ossClient = new OSS\OssClient to new it his namespace is OSS;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants