Reply to Re: Directory Script

Your name:

Reply:


Posted by Fred Atkinson on 10/10/97 11:24

With a little coding, I arrived at a script that does what I
want it to do. Thanks for the lead.

I want to share that script with you. It is pasted below. Put
it in your as index.php in your directory and it comes up with all the
files in that directory with links to them and the filesizes.

Regards,



Fred

<?php
print" <CENTER>\n";
print" <TABLE bgcolor=FFFFFF cellPadding=2 border=0>\n";
print " <TR>\n";
foreach (glob("*.*") as $filename) {
if ($filename != "index.php") {
print " <TD><P ALIGN=left>\n";
print " <A HREF=\"$filename\">$filename</A>\n";
print " </TD>\n";
print " <TD><P ALIGN=right>\n";
print " " . $english_format_number =
number_format(filesize($filename)) . " bytes\n";
print " </TD>\n";
print " </TR>\n";
}
}
print " </TABLE>\n";
print " </CENTER>";
?>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация