get file size php after getting file contents code example Example: php get size of file $fileSizeInBytes=filesize("/path/to/myfile.txt");