Jump to content

[SOLVED] Getting the letters of disk drives using PHP?


random1

Recommended Posts

//wild stab

<--- knows ZERO apache

 

but i think that may be where you need to go, php is the middleman between the user level(html) and the server (apache)

 

but i bet apache could provide php with the disk letters

How can you get an array that contains the letters of disk drives (C,D,E etc) on the current server using PHP?  ???

 

you can make use of following trick

 

foreach ( range( 'a', 'z' ) as $drive ) {

 

    if ( file_exists( $drive . ':\\')) {

 

        echo $drive . ': \ exists';

 

    }

 

}

 

 

  • 1 month later...

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.