Unable to find downloaded files in temp directory after script completion

I am studying a W3 school textbook to learn how to create forms for loading PHP.

To this end, I have the following two files, as shown in W3 schools :

HTML file:

<html>
<body>
<form action="upload_file.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html> 

and the corresponding PHP file as follows:

<?php
if ($_FILES["file"]["error"] > 0)
{
echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
echo "Upload: " . $_FILES["file"]["name"] . "<br />";
echo "Type: " . $_FILES["file"]["type"] . "<br />";
echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
?> 

When I save the above files on my local host and execute the up.html file, PHP outputs the output as follows:

Download: AddTrustExternalCARoot.crt
Type: application / x -x509-ca-cert
Size: 1.4853515625 Kb
Saved in: / tmp / phpK0YqyL

Sorry, I can not find this one /tmp/phpK0YqyL.

Can anyone suggest where this file can be found?

, ( - $_FILES).

+3
3
+7

script.

+4

do not forget to set / temp / folder to read write files

+1
source

All Articles