Search code examples
phpformsiframetemporary-files

Temp file in IFrame Upload form to a PHP file


Whenever someone trying to upload a file, php create a temp file for it on our server. However, if I host the form somewhere else (eg. Server #2), and in Server #1 I reference the form using IFrame, does php generate the temp file in Server #1 ??

Reason behind that: I have a sign-up form which allow people to upload files. Sometimes there are hackers trying to upload infected files to our server. (Which anti-virus caught). However, due to this reason, we are hosting the form somewhere else and referencing the page using an IFrame. I'm just wondering if someone upload an infected file, does server #1 get the infected temp file?

Thank you


Solution

  • php will generate the temporary file (for uploading the file) on the server where the php-upload script is running.