I want to read all the directories from a directory specified via PHP. (unfortunatelynot good enough in VB / C / Java to create a more efficient solution)
With this code, I can read all files from / tmp / example using a Mac:
<?php
$config = array(
'dir' => '/Volumes/Data/Media-Server/Musik/Sortiert', // path to scan
'depth' => 2, // depth of scan
'html' => true // html output (bool)
);
if(file_exists($config['dir'])) {
if(is_readable($config['dir'])) {
$array = scandir($config['dir']);
print_r($array);
}
}
?>
Good luck....................!!!!!!!!
With this code, I can read all files from / tmp / example using a Mac:
$config = array(
'dir' => '/Volumes/Data/Media-Server/Musik/Sortiert', // path to scan
'depth' => 2, // depth of scan
'html' => true // html output (bool)
);
if(file_exists($config['dir'])) {
if(is_readable($config['dir'])) {
$array = scandir($config['dir']);
print_r($array);
}
}
?>
Good luck....................!!!!!!!!
Comments
Post a Comment