Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-09 Thread Raditha Dissanayake
Richard Davey wrote: Hello Ben, Friday, April 9, 2004, 3:36:04 AM, you wrote: BR> Well, is there actually a way to do this or a way to check the filesize BR> and send a nice message to the user that the file is over the BR> limit--other than just some error being thrown? Not until it gets to t

Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Ben Ramsey
JWH> That's what $_FILES['whatever']['size'] is for. Although if the JWH> file is too large, like over the php.ini max file size setting, JWH> I don't think you get to control what happens. That's what I JWH> thought was being discussed. That's exactly what I was asking about. So, there's no way t

Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread John W. Holmes
Richard Davey wrote: BR> That's what I was asking about, actually. How do I capture the filesize BR> without PHP throwing an error about the file being too big? Do a filesize() on the tmp file after upload? If it exceeds whatever limit you think is fair, error nicely. Your limit and the one impos

Re[2]: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Richard Davey
Hello Ben, Friday, April 9, 2004, 3:54:44 AM, you wrote: BR> That's what I was asking about, actually. How do I capture the filesize BR> without PHP throwing an error about the file being too big? Do a filesize() on the tmp file after upload? If it exceeds whatever limit you think is fair, erro

Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Ben Ramsey
RD> Just let them upload the file, check the size when it's arrived and RD> say "sorry, you just wasted X minutes of your life uploading that, RD> try again". That's what I was asking about, actually. How do I capture the filesize without PHP throwing an error about the file being too big? -- Re

Re[2]: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Richard Davey
Hello Ben, Friday, April 9, 2004, 3:36:04 AM, you wrote: BR> Well, is there actually a way to do this or a way to check the filesize BR> and send a nice message to the user that the file is over the BR> limit--other than just some error being thrown? Not until it gets to the server, no. JavaScr

Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Ben Ramsey
JWH> I think the intent is that the browser would catch files that are JWH> too large before they actually have to be uploaded. I don't know JWH> that any browsers actually support this, though. Well, is there actually a way to do this or a way to check the filesize and send a nice message to the

Re: [PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread John W. Holmes
Ben Ramsey wrote: I was reading about this here: http://us3.php.net/manual/en/features.file-upload.php It says: But you should add MAX_FILE_SIZE anyway as it saves users the trouble to wait for a big file being transferred only to find out that it was too big afterwards. So, I decided to ad

[PHP] What does MAX_FILE_SIZE do?

2004-04-08 Thread Ben Ramsey
I was reading about this here: http://us3.php.net/manual/en/features.file-upload.php It says: But you should add MAX_FILE_SIZE anyway as it saves users the trouble to wait for a big file being transferred only to find out that it was too big afterwards. So, I decided to add to my form. It