whats the mimetpye of .xls in file??

Discussion in 'PHP' started by jigen7, Oct 10, 2007.

  1. #1
    is this correct ??
    ($_FILES['sql_file']['type'] == 'application/xls.ms-excel') i need to upload a file in xls format excel type and determine its type before uploading and i dont know the type to be used thx
     
    jigen7, Oct 10, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Any of these.

    application/excel
    application/vnd.ms-excel
    application/x-excel
    application/x-msexcel

    BUT, do not rely on the MIME type in the ['type'], because this value is set by the user's browser and can be modified, and therefore can't be trusted. Use the extension for validation.
     
    nico_swd, Oct 11, 2007 IP
  3. jigen7

    jigen7 Peon

    Messages:
    42
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wow thx very much
     
    jigen7, Oct 11, 2007 IP