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

How to introduce Alibaba Cloud Oss Sdk in thinkphp

WBOY
Release: 2023-03-02 09:54:01
Original
2996 people have browsed it

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

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

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>
Copy after login
Copy after login

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>
Copy after login
Related labels:
php
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template