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 Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

%d blogger menyukai ini: