-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
宋神宗
authored
Mar 19, 2019
1 parent
aace795
commit e8d93d6
Showing
8 changed files
with
135 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[← 首页](../README-CN.md) | 环境要求[(English)](0-Requirements-EN.md) | [安装 →](1-Installation-CN.md) | ||
*** | ||
|
||
## 要求 | ||
- 您必须使用 PHP 5.5.0 或更高版本。 | ||
- 如果您使用了 `RsaKeyPair` 客户端(仅支持日本站),还需要 [OpenSSL PHP 扩展][OpenSSL]。 | ||
|
||
## 建议 | ||
- 使用 [Composer][composer] 并优化自动加载 `composer dump-autoload --optimize` | ||
- 安装 [cURL][cURL] 7.16.2 或更高版本 | ||
- 使用 [OPCache][OPCache] | ||
- 生产环境中不要使用 [Xdebug][xdebug] | ||
|
||
*** | ||
[← 首页](../README-CN.md) | 环境要求[(English)](0-Requirements-EN.md) | [安装 →](1-Installation-CN.md) | ||
|
||
[composer]: https://getcomposer.org | ||
[cURL]: http://php.net/manual/zh/book.curl.php | ||
[OPCache]: http://php.net/manual/zh/book.opcache.php | ||
[xdebug]: http://xdebug.org | ||
[OpenSSL]: http://php.net/manual/zh/book.openssl.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[← Home](../README.md) | Requirements[(中文)](0-Requirements-CN.md) | [Installation →](1-Installation-EN.md) | ||
*** | ||
|
||
## Requirements | ||
- You must use PHP 5.5.0 or later. | ||
- if you use the `RsaKeyPair` (Only Japan station is supported) client, you will also need [OpenSSL PHP extension][OpenSSL]. | ||
|
||
## Recommendations | ||
- Use [Composer][composer] and optimize automatic loading `composer dump-autoload --optimize` | ||
- Install [cURL][cURL] 7.16.2 or later version | ||
- Use [OPCache][OPCache] | ||
- In a production environment, do not use [Xdebug][xdebug] | ||
|
||
*** | ||
[← Home](../README.md) | Requirements[(中文)](0-Requirements-CN.md) | [Installation →](1-Installation-EN.md) | ||
|
||
[composer]: https://getcomposer.org | ||
[cURL]: http://php.net/manual/en/book.curl.php | ||
[OPCache]: http://php.net/manual/en/book.opcache.php | ||
[xdebug]: http://xdebug.org | ||
[OpenSSL]: http://php.net/manual/en/book.openssl.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,51 @@ | ||
[← 首页](../README-CN.md) | 安装[(English)](1-Installation-EN.md) | [客户端 →](2-Client-CN.md) | ||
[← 环境要求](0-Requirements-CN.md) | 安装[(English)](1-Installation-EN.md) | [客户端 →](2-Client-CN.md) | ||
*** | ||
|
||
# 安装 | ||
1. 下载并安装 Composer(Windows 用户请下载并运行 [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe)) | ||
安装 Alibaba Cloud Client for PHP 有如下方式: | ||
|
||
- 通过 Composer 安装依赖 | ||
- 下载使用 ZIP 文件 | ||
|
||
在安装之前,请确保您的环境使用的是 PHP 5.5 或更高版本。了解有关[环境要求和建议的更多信息](0-Requirements-CN.md)。 | ||
|
||
## 通过 Composer 安装依赖 | ||
通过 Composer 安装是推荐方式。Composer 是一款 PHP 工具,用于管理和安装项目的依赖项。有关如何安装 Composer、配置自动加载并遵循定义依赖关系的其他最佳实践的更多信息,请参阅 [getcomposer.org](https://getcomposer.org)。 | ||
|
||
### 安装依赖 | ||
如果已在系统上[全局安装 Composer](https://getcomposer.org/doc/00-intro.md#globally),请直接在项目目录中运行以下内容来安装 Alibaba Cloud Client for PHP 作为依赖项: | ||
```bash | ||
composer require alibabacloud/client | ||
``` | ||
|
||
否则,请下载并安装 Composer(Windows 用户请下载并运行 [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe)) | ||
```bash | ||
curl -sS https://getcomposer.org/installer | php | ||
``` | ||
|
||
2. 执行 Composer 命令安装 Alibaba Cloud Client for PHP 的最新稳定版本 | ||
然后,执行 Composer 命令安装 Alibaba Cloud Client for PHP 作为依赖项 | ||
```bash | ||
php -d memory_limit=-1 composer.phar require alibabacloud/client | ||
``` | ||
|
||
3. 在代码中引入 Composer 自动加载工具 | ||
### 将自动加载工具添加到 PHP 脚本 | ||
要在脚本中使用 Alibaba Cloud Client for PHP,请在脚本中包含自动加载工具,如下所示。 | ||
```php | ||
<?php | ||
|
||
require __DIR__ . '/vendor/autoload.php'; | ||
``` | ||
|
||
## 下载使用 ZIP 文件 | ||
Alibaba Cloud Client for PHP 中的一个 ZIP 文件包含运行开发工具包所需的所有类和依赖项。 | ||
|
||
请[下载 .zip 文件](http://aliyunsdk-pages.alicdn.com/php-sdk/client.zip),然后在项目中的选定位置进行解压缩。然后将自动加载工具包含到您的脚本中,如下所示。 | ||
|
||
```php | ||
<?php | ||
|
||
require __DIR__ . '/vendor/autoload.php'; | ||
``` | ||
|
||
*** | ||
[← 首页](../README-CN.md) | 安装[(English)](1-Installation-EN.md) | [客户端 →](2-Client-CN.md) | ||
[← 环境要求](0-Requirements-CN.md) | 安装[(English)](1-Installation-EN.md) | [客户端 →](2-Client-CN.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,51 @@ | ||
[← Home](../README.md) | Installation[(中文)](1-Installation-CN.md) | [Client →](2-Client-EN.md) | ||
[← Requirements](0-Requirements-EN.md) | Installation[(中文)](1-Installation-CN.md) | [Client →](2-Client-EN.md) | ||
*** | ||
|
||
# Installation | ||
1. Download and install Composer(Windows user please download and run [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe)) | ||
There are ways to install Alibaba Cloud Client for PHP: | ||
|
||
- As a dependency via Composer | ||
- Installing by Using the ZIP file | ||
|
||
Before you install ensure your environment is using PHP version 5.5 or later. Learn more about [environment requirements and recommendations](0-Requirements-EN.md). | ||
|
||
## As a dependency via Compose | ||
Composer is the recommended way to install. Composer is a tool for PHP that manages and installs the dependencies of your project. For more information on how to install Composer, configure autoloading, and follow other best practices for defining dependencies, see [getcomposer.org](https://getcomposer.org). | ||
|
||
### Install | ||
If Composer is already [installed globally on your system](https://getcomposer.org/doc/00-intro.md#globally), run the following in the base directory of your project to install Alibaba Cloud Client for PHP as a dependency: | ||
```bash | ||
composer require alibabacloud/client | ||
``` | ||
|
||
Otherwise, download and install Composer (Windows users please download and run [Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe)) | ||
```bash | ||
curl -sS https://getcomposer.org/installer | php | ||
``` | ||
|
||
2. Execute the Composer command, install the newest and stable version of Alibaba Cloud Client for PHP | ||
Then type this Composer command to install the latest version of the Alibaba Cloud Client for PHP as a dependency | ||
```bash | ||
php -d memory_limit=-1 composer.phar require alibabacloud/client | ||
``` | ||
|
||
3. Require the Composer auto-loading tool | ||
### Add autoloader to your PHP scripts | ||
To utilize the Alibaba Cloud Client for PHP in your scripts, include the autoloader in your scripts, as follows. | ||
```php | ||
<?php | ||
|
||
require __DIR__ . '/vendor/autoload.php'; | ||
``` | ||
|
||
## Installing by Using the ZIP file | ||
The Alibaba Cloud Client for PHP includes a ZIP file containing all the classes and dependencies you need to run. | ||
|
||
Download the [.zip file](http://aliyunsdk-pages.alicdn.com/php-sdk/client.zip), and then extract it into your project at a location you choose. Then include the autoloader in your scripts, as follows. | ||
|
||
```php | ||
<?php | ||
|
||
require __DIR__ . '/vendor/autoload.php'; | ||
``` | ||
|
||
*** | ||
[← Home](../README.md) | Installation[(中文)](1-Installation-CN.md) | [Client →](2-Client-EN.md) | ||
[← Requirements](0-Requirements-EN.md) | Installation[(中文)](1-Installation-CN.md) | [Client →](2-Client-EN.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters