Download the PHP package qcloud/cos-sdk-v5 without Composer

On this page you can find all versions of the php package qcloud/cos-sdk-v5. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cos-sdk-v5

COS-PHP-SDK-V5

腾讯云 COS-PHP-SDK-V5(XML API

PHP Version Latest Stable Version Total Downloads Build Status codecov Support Multiple Versions

依赖

安装

SDK 安装有三种方式:

Composer 方式

推荐使用 Composer 安装 cos-php-sdk-v5,Composer 是 PHP 的依赖管理工具,允许您声明项目所需的依赖,然后自动将它们安装到您的项目中。

您可以在 Composer 官网 上找到更多关于如何安装 Composer,配置自动加载以及用于定义依赖项的其他最佳实践等相关信息。

安装步骤

  1. 打开终端;
  2. 下载 Composer,执行以下命令:

  3. 创建一个名为composer.json的文件,内容如下:

  4. 使用 Composer 安装,执行以下命令:

使用该命令后会在当前目录中创建一个 vendor 文件夹,里面包含 SDK 的依赖库和一个 autoload.php 脚本,方便在项目中调用。

  1. 通过 autoload.php 脚本调用 cos-php-sdk-v5:

现在您的项目已经可以使用 COS 的 V5 版本 SDK 了。

Phar 方式

Phar 方式安装 SDK 的步骤如下:

  1. GitHub 发布页面 下载相应的 phar 文件;

    对于 PHP 版本>= 5.6<7.2.5的用户请下载cos-sdk-v5-6.phar以使用 Guzzle6 版本。
    对于 PHP 版本>=7.2.5的用户请下载cos-sdk-v5-7.phar以使用 Guzzle7 版本。

  2. 在代码中引入 phar 文件:

源码方式

源码方式安装 SDK 的步骤如下:

  1. GitHub 发布页面 下载相应的 cos-sdk-v5.tar.gz 文件;

    对于 PHP 版本>= 5.6<7.2.5的用户请下载cos-sdk-v5-6.tar.gz以使用 Guzzle6 版本。
    对于 PHP 版本>=7.2.5的用户请下载cos-sdk-v5-7.tar.gz以使用 Guzzle7 版本。

  2. 解压后通过 autoload.php 脚本加载 SDK:

快速入门

可参照 Demo 程序,详见 sample 目录

接口文档

PHP SDK 接口文档,详见 https://cloud.tencent.com/document/product/436/12267

配置文件

若您使用 临时密钥 初始化,请用下面方式创建实例。

上传文件

下载文件


All versions of cos-sdk-v5 with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-curl Version *
ext-json Version *
ext-simplexml Version *
ext-mbstring Version *
guzzlehttp/guzzle Version ^6.2.1 || ^7.0
guzzlehttp/guzzle-services Version ^1.1
guzzlehttp/psr7 Version ^1.3.1 || ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qcloud/cos-sdk-v5 contains the following files

Loading the files please wait ....