How to get file size in php ?

Admin   PHP   2020-07-03 23:03:12

If you require to get file size in php then you can do it easily using filesize() of PHP. Normally we require to get and check on before image uploading. So if you want to get image size then bellow example can help you. It will return size on byte.


echo filesize('flower10.jpg') . ' bytes';