Is it possbile to use PHP to list directories outside of the root of the web server - for example c:\images or d:\images? I can use this script to list the files from the root down, but nothing outside of the web server directory.
Thank you.
<?php
filesInDir('d:\policy');
function filesInDir($tdir)
{
echo ("<p><h1>List of files in ($tdir):</h1></p><hr><br />");
$dirs = scandir($tdir);
foreach($dirs as $file)
{
if (($file == '.')||($file == '..'))
{
}
elseif (is_dir($tdir.'/'.$file))
{
filesInDir($tdir.'/'.$file);
}
else
{
echo $tdir.'/'.$file.' --- '.date("F d Y H:i:s", filemtime('$file'))."<br>";
}
}
}
?>



Reply With Quote


Bookmarks