The code:
returns the Content-Type header the browser added to the upload. Basically, it's what the browser (or the user's computer) thinks this file is. It's not fool-proof however, and browsers are not required to include it.$type = $query->uploadInfo($filename)->{'Content-Type'};
See the CGI documentation for more information.
In reply to Re: Getting File Type using Regular Expressions
by Belgarion
in thread Getting File Type using Regular Expressions
by bkiahg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |