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
https://forums.phpfreaks.com/topic/238805-windows-drive-letter/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.