Help Center/ Content Moderation/ SDK Reference/ Using the PHP SDK/ Importing a PHP SDK into a PHP Environment
Updated on 2025-07-02 GMT+08:00

Importing a PHP SDK into a PHP Environment

You are advised to use Composer to install the PHP SDK for Content Moderation. Composer is a dependency manager for PHP. It allows you to declare and install dependencies in a project.

// Install Composer.
curl -sS https://getcomposer.org/installer | php
// Install the PHP SDK.
composer require huaweicloud/huaweicloud-sdk-php

After the installation is complete, you need to import the autoload file of Composer.

require 'path/to/vendor/autoload.php';