Here is my super fast method of getting >2GB files to output the correct byte size on any version of windows works with both 32Bit and 64Bit.
<?php
function find_filesize($file)
{
if(substr(PHP_OS, 0, 3) == "WIN")
{
exec('for %I in ("'.$file.'") do @echo %~zI', $output);
$return = $output[0];
}
else
{
$return = filesize($file);
}
return $return;
}
//Usage : find_filesize("path");
//Example :
echo "File size is : ".find_filesize("D:\Server\movie.mp4")."";
?>