steelmanronald06 Posted June 8, 2011 Share Posted June 8, 2011 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! Quote Link to comment Share on other sites More sharing options...
AbraCadaver Posted June 8, 2011 Share Posted June 8, 2011 echo $_ENV["SystemDrive"]; Quote Link to comment Share on other sites More sharing options...
steelmanronald06 Posted June 8, 2011 Author Share Posted June 8, 2011 HA! You'd think that after searching "php determine windows drive letter", "php windows drive letter" and about 20 other combos that that solution would have been of the TOP results! Thanks! Much appreciated. Quote Link to comment Share on other sites More sharing options...
steelmanronald06 Posted June 8, 2011 Author Share Posted June 8, 2011 *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! :-) Quote Link to comment Share on other sites More sharing options...
Maq Posted June 8, 2011 Share Posted June 8, 2011 *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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.