im stuck and need a solution :(
Posted: Tue Mar 18, 2008 1:37 pm
i think im stuck here, i need a solution for my project.
i want a possibility to view the files without downloading them by clicking them, and ability to view folders.
any one got a solution? 
i want a possibility to view the files without downloading them by clicking them, and ability to view folders.
Code: Select all
<?php
$dir = new DirectoryIterator( '.' );
foreach($dir as $file ){
if(!$file->isDot() && !$file->isDir()); {
echo "FileName: <a href='".$file->getFilename();
echo "'>" .$file->getFilename();
echo "</a>";
echo "<BR/>";
echo "Size: ".number_format(($file->getSize()/1024),2)." Kb";
echo "<BR/>";
echo "Date Created: ".date("D d M Y H:i:sa",$file->getCTime());
echo "<BR/>";
echo "<BR/>";
}
}
echo "<a href='index.php'>Back.</a>"
?>