I want to create directory and sub directory in azure storage from php and get that directory. This is my code.
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connection_string);
$content = fopen("abc.txt", "r");
$blob_name = "dir1/dir2/di3/myblob";
try {
//Upload blob
$blobRestProxy->createBlockBlob("mycontainer", $blob_name, $content);
}
catch(ServiceException $e){
// Handle exception based on error codes and messages.
// Error codes and messages are here:
// http://msdn.microsoft.com/library/azure/dd179439.aspx
$code = $e->getCode();
$error_message = $e->getMessage();
echo $code.": ".$error_message."<br />";
}
I want to get directory "dir1".I checked that example How to create a sub container in azure storage location. But it's not in php. Can any one help me how can we create and get directory in azure from PHP code.