i could get the size of the file i uploaded, however, i want to convert it to MB, i dont want to make some computations, is there any easy way to do that????
xuexue
15
Junior Poster
Recommended Answers
Jump to PostThe only way you can do that is with computations, rest easy though, the computer takes care of the actual math for you:
$bytes = $_FILES['my_file']['size']; //Size of file in bytes $kbytes = $bytes / 1024; $mbytes = $kbytes / 1024; //Size in Mega bytes
Nice and …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.