Install the SDK Package
Updated at:2025-10-16
Runtime environment
The PHP SDK requires PHP version 5.3.2 or later to operate.
Install SDK
- Download the EIP PHP SDK toolkit (ZIP package) from the Official Website.
- The decompressed ZIP package contains the following files:
PHP
1BaiduBce.phar //PHP SDK
- Add the following code in the script file to use the SDK:
PHP
1include 'BaiduBce.phar';
2 require 'YourConf.php';
SDK directory structure
PHP
1BaiduBce.phar
2├──src
3│ └── BaiduBce
4 │ ├── Auth //BCE signature
5 │ ├── Exception //BCE client exception
6 │ ├── Http //BCE HTTP communication
7 │ ├── Log //BCE log
8│ ├── Services
9 │ │ └── Eip //EIP main directory, which must be retained
10 │ │ ├── EipClient.php //Eip operation class. All operations can be completed via EipClient class
11 │ │ └── model //EIP internal models, such as billing
12 │ │ └── EipGroup //EIPGROUP main directory, which must be retained
13 │ │ ├── EipGroupClient.php //EIPGROUP operation class, all operations can be performed via the EipGroupClient class
14 │ │ └── model //EIPGROUP internal models, such as billing and reservation
15 │ └── Util //BCE common utilities
16 └──vendor //Third-party libraries
