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? Link to comment https://forums.phpfreaks.com/topic/129688-dealing-with-windows-drives-from-php/ 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. Link to comment https://forums.phpfreaks.com/topic/129688-dealing-with-windows-drives-from-php/#findComment-672401 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? Link to comment https://forums.phpfreaks.com/topic/129688-dealing-with-windows-drives-from-php/#findComment-672404 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.