How about reading the directory, and getting the file-size during the reading?
<?php
$dir = 'directory/to/be/scanned/'; // Note the ending "/"
$d = dir($dir);
while(false !== ($entry = $d->read()))
{
if($entry != '.' && $entry != '..')
{
if(is_file($dir.$entry))
{
$files[$entry] = filesize($dir.$entry);
}
}
}
asort($files, SORT_NUMERIC);
$largest = key(end($files));
?>
$largest should have the filename of the largest file now.
~Brett