Jump to content

Windows Drive Letter

Recommended Posts

In order to use the disk_total_space() function in PHP, you must supply the directory that it should look to.  For unix this is pretty simple because I just have it look to / and get the total disk space.  I'm using a conditional statement to determine Unix or Windows system.  What I haven't been able to determine, is the Windows Drive Letter.  For my windows server, I know I can just put in C: and it works. This has to be user independent.  After reading through different articles on google, and even an enhancement request on php.net where someone contributed code that would create a function to do this, I still have been unable to find a method that will determine the root drive letter of a Windows Server.


Any insight to a PHP function, a home-brew function, or an article on this topic is greatly appreciated.  Two days of no results has me slightly frustrated, haha!

Link to comment
Share on other sites

*sigh*  I see my old teammates have messed around with the forum software and the Topic Solved mod is no longer in place.  Oh well, back to the old school way of doing things!


Topic Solved! :-)

It's on the bottom right now ;)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.