Re: File uploads
- From: Steve <asjflajfa.@xxxxxxxxxxxx>
- Date: Mon, 05 May 2008 17:24:20 GMT
Erwin Moller
<Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> wrote in
news:481f4365$0$14356$e4fe514c@xxxxxxxxxxxxxx:
Steve schreef:
Hiya all,
Need a bit of help. Doing a small upload script that i want to limit
to only uploading some file types, like .zip .ace .rar . how can I
check that only these files are being uploaded?
thanks
Hi,
http://nl3.php.net/manual/en/features.file-upload.php
Use $_FILES['userfile']['name'] to find the original filename.
Simply check the extension (if any), and refuse the file if it isn't
.zip or .ace etc..
Warning, I can easily rename bla.gif to bla.zip and upload it.
Finding out if the file is what it claims to be is a lot harder.
Regards,
Erwin Moller
---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 080504-0, 04/05/2008
Tested on: 05/05/2008 18:27:39
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
how can that be done
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 080504-0, 04/05/2008
Tested on: 05/05/2008 18:28:34
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
.
- Follow-Ups:
- Re: File uploads
- From: Erwin Moller
- Re: File uploads
- References:
- File uploads
- From: Steve
- Re: File uploads
- From: Erwin Moller
- File uploads
- Prev by Date: File uploads
- Next by Date: Re: File uploads
- Previous by thread: Re: File uploads
- Next by thread: Re: File uploads
- Index(es):
Relevant Pages
|