Guardian-Mage Posted October 23, 2008 Share Posted October 23, 2008 Right now I have a basic script to get a list of drives when running Windows: <?php $str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for ($i = 0;$i<26;$i++){ $t = substr($str,$i,1); if (is_dir($t . ":")) { echo $t; } } exit; ?> Is there a way to do this faster, and how might I get the actual name of the drive? Quote Link to comment Share on other sites More sharing options...
hellonoko Posted October 23, 2008 Share Posted October 23, 2008 I dont know if it would be faster but you could use a glob. I don't know if it supports hard drives either. Quote Link to comment Share on other sites More sharing options...
Guardian-Mage Posted October 23, 2008 Author Share Posted October 23, 2008 I couldn't get those to work. What about coming up with the name? 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.