Following on my from my other thread, with my limited PHP skills I've managed to make this little script to list the files in a directory (called $username), when the user enters that name in a little form. Nice and simple, as follows:
What I'd really like to do is to print the file size next to the name? I've been reading about []bfilesize($file)[/b] but I'm just not getting it. Can anyone help? 
PHP:
$dir_handle = @opendir($username) or die("The username '$username' does not exist. Please try again.");
echo "Hello $username, the following files are available for you to download.<br/>Please right-click and 'Save as..'<br/>";
// running the while loop to list files
while ($file = readdir($dir_handle))
{
if($file!="." && $file!="..")
echo "<a href='$username/$file'>$file</a><br/>";
}
// closing the directory
closedir($dir_handle);
}
