Home  >  Article  >  Backend Development  >  How to introduce Alibaba Cloud Oss Sdk in thinkphp

How to introduce Alibaba Cloud Oss Sdk in thinkphp

WBOY
WBOYOriginal
2016-12-01 01:27:192966browse

After downloading the document, I put it under ORG but import("ORG.Alioss.alioss");

<code>    $tt=new \OssClient();
    
    一直提示 Class 'OssClient' not found  怎么办大哥</code>

Reply content:

After downloading the document, I put it under ORG but import("ORG.Alioss.alioss");

<code>    $tt=new \OssClient();
    
    一直提示 Class 'OssClient' not found  怎么办大哥</code>

I put it in vendor, and the information is in the configuration file.

<code>        Vendor('OSS.autoload');
        $config=C('ALIOSS_CONFIG');
        $oss=new \OSS\OssClient($config['KEY_ID'],$config['KEY_SECRET'],$config['END_POINT']);
        return $oss;</code>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn