You are here: Re: Directory Script « All PHP « IT news, forums, messages
Re: Directory Script

Posted by Janwillem Borleffs on 10/05/22 11:24

Fred Atkinson wrote:
> I'd like to arrange for it to be in columns like:
>
> filename1.txt Size 254,127 bytes
> filename2.dat Size 172,487 bytes
>
> etc. and so on.
>
> I'd also like to make it so that 'filename1.txt' and the
> subsquent values show up as a link you can click on to go to that
> file.
>

Something like the following should do it:

$files = glob("*.*");

foreach ($files as $f) {
echo "<a href='$f'>$f</a> -- ", filesize($f), " bytes<br />";
}


JW

 

Navigation:

[Reply to this 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

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