Re: Check type of uploaded file
| From: | Richard Davey | Date: | Sun, 07 Dec 2003 04:01:25 +0000 |
| Subject: | Re: Check type of uploaded file | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-172113@lists.php.net to get a copy of this message | ||
Hello Bob,
Sunday, December 7, 2003, 1:00:44 AM, you wrote:
BH> I want to test an uploaded file to see if it is a text file, but I don't want
BH> to rely on the presence of an os command such as 'file.' Is there a
BH> straightforward way to do this within PHP? Thanks in advance.
Yes, check the $_FILES['userfile']['type'] after upload.
--
Best regards,
Richard mailto:rich@launchcode.co.uk