Yes, it still gets into the /tmp directory, but it gets deleted when the script finishes executing.
posting an image to a php script that does expect it
Question
if an image is posted to a php script but the php script isn't expecting an image to be posted to it, what happens to the posted image? does it still go into the /tmp folder on the server?
example:
<form action="myscript.php" enctype="multipart/form-data" method="post">
<p>
Type some text (if you like):<br>
<input type="text" name="textline" size="30">
</p>
<p>
Please specify a file, or a set of files:<br>
<input type="file" name="datafile" size="40">
</p>
<div>
<input type="submit" value="Send">
</div>
</form>
my script:
<?php
phpinfo();
?>
Solution
OTHER TIPS
whatever you posted through form will go to the server
Yes!
it will be uploaded to upload_tmp_dir
defined in php.ini
file.
it will deleted once your php file finish execution.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow