script buat list isi direktori

 

 
Index Page
 

 
<!–
 
pre          { font-family: Verdana; font-size: 8pt }
 
td           { font-family: Verdana; font-size: 8pt }
 
p            { font-family: Verdana; font-size: 8pt }
 
 
 
body         {
 
        font-family: Verdana, Arial, Helvetica, sans-serif;
 
        font-size: 11px;
 
        background-color: #9999FF;
 
        color: rgb(0, 51, 102);}
 

 

 

 

 

   Index of
 

 

 

 

 

 

 

 

 

 

 

 

 
<?php
 
// tom@forcedinstinct.com
 
$gen = date ("M d Y h:i:s A");
 
clearstatcache();
 
$total = 0;
 
$size = 0; // tambahan
 
if ($handle = opendir('.')) {
 
while (false !== ($file = readdir($handle))) {
 
if ($file != "." && $file != "..") {
 
if (filetype($file) == "dir") {
 
$file = $file."/";
 
};
 
$total = $size + $total;
 
$size = filesize($file);
 
$size = round($size/1024,2);
 
$date = date ("M d Y h:i:s A", filemtime($file));
 
echo "

“;
 
echo “

“;
 
echo “

“;
 
echo “

“;
 
echo “

“;
 
}
 
}
 
closedir($handle);
 
}
 
?>
 

 

 

 

 

 

 

 

 

 
File Name
 
File Size
 
Date
 


“;
 
echo “$file
“;
 
echo “$size KB
“;
 
echo “$date
 


 

Total Size: 

 

KB

 

 

 

 

Page generated on

 

 

  1. No trackbacks yet.

Tinggalkan komentar