News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Swan' Blog:
Determining Azure Drive Letter with PHP
October 29, 2010 @ 12:34:01

In a quick new post to his blog today Brian Swan shows you how to find a drive letter in Azure through PHP (for a Windows Azure Drive).

Today, I'll start by taking a look at Windows Azure Drives. Specifically, I'll explain how to programmatically determine the driver letter for a Windows Azure Drive. (I'll assume you've read the getting started post I wrote a couple of weeks ago.) Simply put, a Windows Azure drive acts as a local NTFS volume that is mounted on the server's file system and that is accessible to code running in a role. The data written to a Windows Azure drive is stored in a page blob defined within the Windows Azure Blob service, and cached on the local file system.

He shows how he's set up his instance with two drives and how, with a bit of PHP code, he could grab the value from the "X_DRIVES" environment variable, split it out and loop to find the drive you're looking for. His example code puts a simple text file on the drive and then reads it back out.

0 comments voice your opinion now!
drive letter windows azure instance xdrives environment


blog comments powered by Disqus

Similar Posts

SitePoint PHP Blog: Translation and Text-to-Speech with Microsoft Translator

Brian Swan's Blog: SQL Server Driver for PHP: Understanding Windows Authentication

PHPWomen.org: Bundled go-pear.phar broken in 5.2 windows releases

Ilia Alshanetsky's Blog: PHP 5.2.1 RC1 Available for testing

PHP-GTK Community Site: Which development environment do you use most for PHP-GTK?


Community Events

Don't see your event here?
Let us know!


interview introduction api application install example symfony2 series release configure performance framework podcast community conference laravel voicesoftheelephpant opinion library php7

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework