You need to check the size of a file in PHP function. $size = X(filename); Which function will sizesuitably replace 'X'? code example
Example: php get size of file
$fileSizeInBytes=filesize("/path/to/myfile.txt");
$fileSizeInBytes=filesize("/path/to/myfile.txt");