Odd Parse error

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

m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

that's not 100 kb. remember, you're looking for 100 kb means you realie that a fileon your comp that is "100 kb" is more than 100,000 bytes. as far as the comp is concerned, there's 1024 byts in a kbyou want 100*1024 if you want 100 kb
that's 102400.
did you mean mb?
that's 100*1024*1024 or 104857600 bytes
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

No no...I was trying to upload a 100 kb picture. I think the number in my MAX_FILE_SIZE is more than that. That is just an arbitrary number that is (hopefully) more than anything I will ever need for this purpose.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

max file size is in bytes. it's suppossed to reject anything, but like i found out, it's not a garuntee. your best bet a php check
User avatar
evilmonkey
Forum Regular
Posts: 823
Joined: Sun Oct 06, 2002 1:24 pm
Location: Toronto, Canada

Post by evilmonkey »

Yeah, the problem is, it tells me that the file is too big, while i'm trying to upload a file that is obviously smaller.
Post Reply