PHP应用访问Azure中国区存储服务
来源:互联网 发布:sql 创建存储过程 编辑:程序博客网 时间:2024/04/28 14:51
在上一篇中我介绍了Python应用如何访问中国区服务。PHP也是类似的
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为
$connectionString = "BlobEndpoint=https://[yourAccount].blob.core.chinacloudapi.cn/;QueueEndpoint=https://[yourAccount].queue.core.chinacloudapi.cn/;TableEndpoint=https://[yourAccount].table.core.chinacloudapi.cn/;DefaultEndpointsProtocol=[http|https];AccountName=[yourAccount];AccountKey=[yourKey]]";
也就是在连接字符串中加入每个存储服务的端点URL,然后就可以访问国内的存储了。
另外,Azure的PHP SDK源代码在https://github.com/WindowsAzure/azure-sdk-for-php。有兴趣的用户可以自己查看下源码
0 0
- PHP应用访问Azure中国区存储服务
- 中国版Azure最新上线服务
- 中国Azure媒体服务RESTAPI的Endpoint
- 中国Azure媒体服务RESTAPI的Endpoint
- 如何使用Azure Container Service Engine在Azure中国区部署容器服务(一):DC/OS篇
- 如何使用Azure Container Service Engine在Azure中国区部署容器服务(一):DC/OS篇
- 如何使用Azure Container Service Engine在Azure中国区部署容器服务(二):Kubernetes篇
- Windows Azure Platform (九) Windows Azure Storage Service存储服务
- 通过Java访问国内Azure服务
- 如何使用Azure云服务和SQL Database部署PHP应用
- Python应用访问国内Azure站点
- 通过 PHP 使用China Azure Blob 存储
- Windows Azure中国区网络性能初评
- 配置Azure命令行工具连接中国区
- 有谁知道ios如何访问Azure的相关服务?
- 深入了解云中的关系数据存储服务 SQL Azure
- 关于Azure的存储(Storage)服务类型
- PHP on Windows Azure 入门教学系列(一):在Windows Azure内运行PHP应用
- 英语写作必背200句
- PB未公開函數:__get_attribute()
- android多媒体本地播放流程video playback--base on jellybean (四)
- android多媒体本地播放流程video playback--base on jellybean (五)
- 深入解析Oracle IMU模式下的REDO格式
- PHP应用访问Azure中国区存储服务
- 用ODBC连excel
- android 多媒体文件之mp4分析---base on jellybean(六)
- 1N4148
- android 多媒体文件之mp4分析(续)---base on jellybean(七)
- android多媒体框架之流媒体----base on jellybean(八)
- android多媒体框架之流媒体框架----base on jellybean(九) .
- android多媒体框架之流媒体AHandler消息机制----base on jellybean(十) .
- android多媒体框架之流媒体具体流程篇1----base on jellybean(十一) .