|
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]
|