![](/img/trans.png)
[英]Download blob file from Azure Blob Storage using the Azure PHP SDK
[英]Write text file to Blob in Azure using PHP
我正在嘗試將文本文件寫入Blob。 我知道我必須創建一個容器和一個Blob。 我需要寫這樣的東西:
$text = 'some text';
$myFile = "file.txt";
$fh = fopen($myFile, 'w') or die("can't open file c");
fwrite($fh, $json);
fclose($fh);
問題是我想編寫此php腳本,但是使用blob(我們無權訪問系統文件)怎么辦?
將文件保存到磁盤后,您需要將其上傳到容器:
_storageClient->putBlob('mycontainer', 'file.txt', 'file.txt');
您可以使用Windows Azure PHP SDK來完成此操作。 請遵循本教程以獲取更多信息: 將Blob放入Blob容器中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.