PHP.nl

filesize

filesize

Gets file size

 **filesize** string $filename

Gets the size for the given file.

filenamePath to the file.

Returns the size of the file in bytes, or false (and generates an error of level ) in case of an error. E_WARNING

Voorbeeld: example

<?php

// outputs e.g.  somefile.txt: 1024 bytes

$filename = 'somefile.txt';
echo $filename . ': ' . filesize($filename) . ' bytes';

?>

file_exists