对于自定义应用程序,我正在尝试使用 php-opencloud 库集成 Rackspace 云文件。
这是我设置的链接 - https://github.com/srijanaravali/php-opencloud/blob/master/docs/getting-started.md
# Install Composer
curl -sS https://getcomposer.org/installer | php
# Require php-opencloud as a dependency
php composer.phar require rackspace/php-opencloud:dev-master
但是,当我尝试实例化客户端对象时,它会引发错误:
Fatal error: Class 'OpenCloud\Rackspace' not found in /var/www/example/Project/sites/all/libraries/php-opencloud/test.php on line 7
这是代码片段:
<?php
require 'vendor/autoload.php';
use OpenCloud\Rackspace;
// 1. Instantiate a Rackspace client.
$client = new Rackspace(Rackspace::US_IDENTITY_ENDPOINT, array(
'username' => getenv('Axxxxxxx'),
'apiKey' => getenv('abcxxxxxxxxxxxxxxxxxxxx')
));
print_r($client); die('!!');
关于缺少什么的任何指示?