Jump to content

doc and pdf upload files help


lucan

Recommended Posts

I am looking to allow people to also upload pdf and doc ad txt  files can you show me how to convert this script . Thanks.

[code=php:0]

// Check to see if the type of file uploaded is a valid image type 
function is_valid_type($file)  
{ 
// This is an array that holds all the valid image MIME types  

     $valid_types = array("image/jpg", "image/jpeg", "image/bmp","image/gif");  
     if (in_array($file['type'], $valid_types))  

         return 1;  

     return 0;  
}

[/code]

 

Link to comment
https://forums.phpfreaks.com/topic/228863-doc-and-pdf-upload-files-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.