Jump to content

Dealing with windows drives from php


Guardian-Mage

Recommended Posts

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

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.