Created
August 15, 2017 10:51
-
-
Save catharsis96/5c7d971bfc856ecc58723556d961eeb7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'WindowsAzure.php'; | |
use WindowsAzure\Common\ServicesBuilder; | |
try { | |
$connectionString = 'DefaultEndpointsProtocol=https;AccountName=account name;AccountKey=account key'; | |
echo "1"; | |
$blobRestProxy = ServicesBuilder::getInstance()->createBlobService($connectionString); | |
echo "2"; | |
} catch(ServiceException $e){ | |
// Handle exception based on error codes and messages. | |
// Error codes and messages are here: | |
// http://msdn.microsoft.com/en-us/library/windowsazure/dd179446.aspx | |
$code = $e->getCode(); | |
$error_message = $e->getMessage(); | |
echo $code.": ".$error_message."<br />"; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment