Hello There
I'm new to PHP and trying to code a function that reads all teh files out of
a directory and printing out a link and the filesize,
but it seems that the filesize() function doesn't work, here's the code so
far:
$handle = opendir ('images');
echo "Files:<br><br>";
while (false !== ($file = readdir ($handle))) {
if($file != "." && $file != "..")
{
$file_s = filesize($file);
echo "<a href=images/$file>$file</a> Filesize:
$file_s<br>";
}
}
closedir($handle);
and the output is somethingl ike this:
Files:
button_test_04.gif Filesize:
button_test_03-down.gif Filesize:
lilextras_01.gif Filesize:
(and so on)...
You see, there's no Filesize and I don't know why, please help me
-- manu
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]