Jump to content

FileSize from DB


HBen

Recommended Posts

Hello guys , i hope everyone is doing great ! :good:

So i was trying to get a file size from the file i uploaded to the BD , i succeded to get it

using

$filesize=$_FILES['uploadMedia']['size'];

but the problem was that i got the size in form of bits

348160 bits instead of 340 KB

is there any way to convert the bits to kb and Mb ??

i tried this function filesize($filename) but no luck

Thank you Guys :)

Link to comment
Share on other sites

Have you ever done conversions between units before?

 

Knowing how many bytes you have you can convert it to kilobytes or megabytes or gigabytes with a simple mathematical operation.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...