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

How to introduce Alibaba Cloud Oss Sdk in thinkphp

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-03-02 09:54:01
Original
3049 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
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template