Checking File Type

Im making a file uploading form and in the tutorial, the code to check if its the right looms like this.
[php]if($type != ‘image/png’) {
die(“Only png accepted”);
}[/php]

I want it to accept a .map file for a video game. How can I change it to only accept those? Thank you.

You need to check the MIME type of the file. That is what that block does.

Sponsor our Newsletter | Privacy Policy | Terms of Service