Re: filtering filename.ext on file-upload.
| From: | daniel at electroteque dot org | Date: | Fri, 16 Jan 2004 02:58:32 +0000 |
| Subject: | Re: filtering filename.ext on file-upload. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174759@lists.php.net to get a copy of this message | ||
>> On Friday 16 January 2004 10:10, Louie Miranda wrote:
>>> How can you filter the extension for files being uploaded on a system
>>> via form.
>>
>> Use pathinfo() to get the file extension.
>>
>> --
>
> I suggest you check out the pear Upload class, its exactly what you
> need.
>
http://pear.php.net/package/HTTP_Upload
I made a mod to it, to filter mimetypes aswell ,as people could change an
extension to something else, but this can filter for the mimetype too ,
dont know if thom would be interested on it
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php