Loading ...
Sorry, an error occurred while loading the content.
 

File Uploading Problem...HeLp Please..

Expand Messages
  • Mynul Islam
    I m tyring to upload files in a directory but only being able to make it work for Image files (jpg, gif, png, tif, etc) and PDF. but i need to upload .doc,
    Message 1 of 1 , Jan 30, 2007
      I'm tyring to upload files in a directory but only being able to make
      it work for Image files (jpg, gif, png, tif, etc) and PDF. but i need
      to upload .doc, .xls, .txt and .ppt/pps files also. but my code is not
      allowing them. Can someone please debug my code and let me know the
      right procedure PLEASE!

      ======================================================
      function ImgUpload1()
      {
      global $photo1, $photo1_name, $photo1_type, $photo1_size;
      //Checking format
      if (($photo1 != '') && ($photo1 != "none")){
      if (($photo1_type != "application/pdf") && ($photo1_type
      !="application/msword") && ($photo1_type !="application/vnd.ms-excel")
      && ($photo1_type !="text/plain") && ($photo1_type !="application/zip")
      && ($photo1_type !="application/x-rar-compressed"))
      {
      die ("Your File is in an incorrect format! Please check the Proper
      formats.")
      ===============================================

      When i upload any image Or Pdf it works fine but when i try to upload
      any .doc/.xls/.txt/.ppt/.pps files it shows the ERROR message.

      Somebody please Help.
    Your message has been successfully submitted and would be delivered to recipients shortly.