我正在尝试使用 azure cdn 服务,我在下面的代码中遇到了这个错误,我到处搜索,但我没有在互联网或官方 azure git 呼吸或他们的网站上找到 CreateBlobOption 类,帮助我,我被它困住了
<?php
require_once __DIR__.'/vendor/autoload.php';
use WindowsAzure\Common\ServicesBuilder;
use WindowsAzure\Common\ServiceException;
$connectionString = 'DefaultEndpointsProtocol=http;AccountName=myaccount;AccountKey=my_key';
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);
$content = fopen('my_file.jpg','r');
$blob_name = 'my_file.jpg';
$options = new CreateBlobOptions();
$options->setBlobContentType('image/jpeg');
try
{
$blobRestProxy->createBlockBlob("images", $blob_name, $content,$options);
}
catch(ServiceException $e)
{
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code.": ".$error_message."<br />";
}