Php File Upload

Discussion in 'PHP' started by jessysmith1234, Feb 19, 2013.

  1. #1
    How To Get the Uploaded File Information in the Receiving Script?
     
    jessysmith1234, Feb 19, 2013 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    $_FILES is to being used there, the rest of the information you need to gather yourself!
     
    EricBruggema, Feb 19, 2013 IP
  3. worldart

    worldart Banned

    Messages:
    26
    Likes Received:
    3
    Best Answers:
    1
    Trophy Points:
    28
    #3
    When you upload file using html form component input type=file name=fupload then you can write following code on the receiving page to get the file information

    
    <?php
    echo $_FILE["fupload"]["size"] ;
    echo $_FILE["fupload"]["name"] ;
    echo $_FILE["fupload"]["type"] ;
    ?>
    
    Code (markup):
    type will give you mime type information rest gives you size and name of the file
     
    worldart, Feb 19, 2013 IP
    Suimme likes this.