Skip to content
Advertisement

get uploaded file size in bytes in php

I am uploading a file which is an image. I want to get the size of that image every time in bytes only using PHP. I had done this by far

JavaScript

Advertisement

Answer

Your code is right, the below line will give you the size in bytes:

JavaScript

You can also get the file size after the file has been uploaded this way:

JavaScript

This option will also give you the file size in bytes

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement