On 6 September 2010 14:46, Jordan Jovanov <jovanovj...@gmail.com> wrote:
> Hi All
>
> I need me a little help.
> I create scripte for upload file is work very good but the problem is next:
> I neet to upload only .zip file i need to disable some user to shoise to
> upload another file Extensions.
>
> Can somebody help me.
>
> Thanks a lot.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Using standard HTML ... no. There is nothing in the <input type="file>
element to instantly limit the file type. You can use JavaScript to
some degree (http://www.codestore.net/store.nsf/unid/DOMM-4Q8H9E for
example).

As far as PHP goes, one of the values returned to you is the
$_FILES['userfile']['type'] property.

If this matches the zip file mime type (application/x-zip but also
application/x-gzip and maybe multipart/x-gzip, multipart/x-zip), then
you have a better chance of knowing it is a zip file.
-- 
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to