PHP code, how can i add new file extension to code:...

  • Thread starter Thread starter Jam
  • Start date Start date
J

Jam

Guest
...$upload->set("supported_extensions",array( ? Hi
I have a php class which simply allows people to upload files to the internet.

It accepts gif and .jpg, gif, .png file extentions/formats, i want it to accept word documents instead.

I tried putting in .doc, .docx(word 97) but its not working, please help.

full code is here: http://pastebin.com/m6a6bfcef
Here is the code which i believe needs changing:
$upload->set("supported_extensions",array("gif" => "image/gif" ,"gif" => "image/pjpeg","jpeg" => "image/pjpeg" ,"png" => "image/x-png")); // Allowed extensions and types for uploaded file.

Thanks in advance

Tovia singer
 
Back
Top