require_once "WindowsAzure/WindowsAzure.php"; require_once 'PHPUnit\autoload.php';
use WindowsAzure\Common\ServicesBuilder; use WindowsAzure\Common\ServiceException;
// Create Connection String $connectionString = "DefaultEndpointsProtocol=http;AccountName=[yourAccount];AccountKey=[yourKey]"; // Create table REST proxy. $tableRestProxy = ServicesBuilder::getInstance()->createTableService($connectionString);
<?php require_once "WindowsAzure/WindowsAzure.php"; require_once 'PHPUnit\autoload.php'; use WindowsAzure\Common\ServicesBuilder; use WindowsAzure\Common\ServiceException; // Create Connection String $connectionString = "DefaultEndpointsProtocol=http;AccountName=[Your Account];AccountKey=[Your Key]"; // Create table REST proxy. $tableRestProxy = ServicesBuilder::getInstance()->createTableService($connectionString); try { // Create table. $tableRestProxy->createTable("customer"); echo "Storage Table 'customer' has been created."; } catch(ServiceException $e){ $code = $e->getCode(); $error_message = $e->getMessage(); // Handle exception based on error codes and messages. // Error codes and messages can be found here: // http://msdn.microsoft.com/en-us/library/windowsazure/dd179438.aspx } ?>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท