Baidu AI Cloud
中国站

百度智能云

CDN

SDK Installation Toolkit

Running environment

The PHP SDK package requires an operating environment of at least PHP 5.3.2.

Installation Steps

  1. Download the PHP SDK compression toolkit at Official Website.
  2. There are three files after decompressing the ZIP package, as follows:

        1. BaiduBce.phar                    //PHP SDK  
        2. CdnClientSample.php         //Example  
        3. CdnSampleConf.php                // See configuration file; see below for details 
  3. Add the following code to the script file and you can use the SDK package:

        1. include BaiduBce.phar;  
        2. require YourConf.php; 

    SDK's directory structure

     1. BaiduBce.phar 
     2. ├──src 
     3. │   └──BaiduBce 
     4. │       ├──Auth                //BCE signature related 
     5. │       ├── **Exception**           //BCE client exception 
     6. │       ├──Http                //BCE's Http communication related 
     7. │       ├── **Log**                 //BCE log 
     8. │       ├──Services 
     9. │       │   └──Cdn                   //Cdn home directory which must be kept 
    10. │       │       ├──CdnClient.php     //Cdn operation class (all operations can be completed through the CdnClient class) 
    11. │       └──Util                //BCE utility 
    12. └──vendor                       //Third-party libraries
Previous
Overview
Next
Getting Started