Search code examples
phpposttmp

posting an image to a php script that does expect it


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

  • Yes, it still gets into the /tmp directory, but it gets deleted when the script finishes executing.