File upload problems

Discussion in 'Programming' started by AimyThomas, Sep 18, 2012.

  1. #1
    When I upload image files they have the same extension twice. And my script doesn't show it even it the path is correct.

    Some scripts copy the file from the tmp dir server to the required directory, while others just move it. What happens to the files that were just copied? Do they stay there or does the server remove them?

    Thanks in Advance
     
    AimyThomas, Sep 18, 2012 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    Well the files will be removed after the session of the current user (ip address) expires. And yes you can use copy or move_uploaded_file functions, i recommend the move_uploaded_file function, coz then the server has nothing to do after the session is expired. So yes the answer is that the server removes them after session expires!

    Twice the extension is a fault in scripting, poor scripting that's called, coz good scripters add there own extension to each upload and check there content.
     
    EricBruggema, Sep 22, 2012 IP