Windows Azure官方文档介绍了如何在PHP代码中安装Azure SDK并访问Azure存储: http://www.windowsazure.com/en-us/Documentation/Articles/storage-php-how-to-use-blobs/?fb=zh-cn 其中,获取BLOB引用的办法为: $connectionString = 'DefaultEndpointsProt
Windows Azure官方文档介绍了如何在PHP代码中安装Azure SDK并访问Azure存储:
http://www.windowsazure.com/en-us/Documentation/Articles/storage-php-how-to-use-blobs/?fb=zh-cn
其中,获取BLOB引用的办法为:
$connectionString = 'DefaultEndpointsProtocol=[http|https];AccountName=[yourAccount];AccountKey=[yourKey]' // Create blob REST proxy. $blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString);
$connectionString = "<span>BlobEndpoint=https://[yourAccount].blob.core.chinacloudapi.cn/;QueueEndpoint=https://[yourAccount].queue.core.chinacloudapi.cn/;TableEndpoint=https://[yourAccount].table.core.chinacloudapi.cn/</span>;DefaultEndpointsProtocol=[http|https];AccountName=[yourAccount];AccountKey=[yourKey] ]";
另外,Azure的PHP SDK源代码在https://github.com/WindowsAzure/azure-sdk-for-php。有兴趣的用户可以自己查看下源码