Reusing the temporary file created by a file upload in a PHP form
问题 regarding file uploads, I have a form through which I upload a file, I get the $temp_name = $_FILES['name']['temp_name'] and store it in a variable. Can I then use that variable again inside move_uploaded_file("$temp_name","$location") inside another form. Will this work?? When we upload a file, there is a temp location created on the server. How long can the temporary file be used for? Thanks. 回答1: You can only use that name in the script which receives the upload since the temporary file