File size

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

File size

Post by YoussefSiblini »

Hi,
I am getting the file size from a form:

Code: Select all

if ($_FILES["file"]["size"] > 500)
What is the 500 size, is it 500 bytes, kilo bytes ...



Youssef
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: File size

Post by Celauran »

phphelpme
Forum Contributor
Posts: 261
Joined: Sun Nov 21, 2010 3:32 pm

Re: File size

Post by phphelpme »

check your php.ini file for your currently set limit and it would be measured in bytes.

'The MAX_FILE_SIZE hidden field (measured in bytes)' as the website link would state. :)
YoussefSiblini
Forum Contributor
Posts: 206
Joined: Thu Jul 21, 2011 1:51 pm

Re: File size

Post by YoussefSiblini »

Thank you guys,
Yes I checked and it is in bytes :)
Post Reply