Re: File uploads
- From: Erwin Moller <Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
- Date: Mon, 05 May 2008 19:27:03 +0200
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
.
- Follow-Ups:
- Re: File uploads
- From: Steve
- Re: File uploads
- References:
- File uploads
- From: Steve
- File uploads
- Prev by Date: Re: File uploads
- Next by Date: Re: File uploads
- Previous by thread: File uploads
- Next by thread: Re: File uploads
- Index(es):
Relevant Pages
|