Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5982731
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:07:44+00:00 2026-05-22T22:07:44+00:00

I am trying out a tutorial on W3 schools to learn how to create

  • 0

I am trying out a tutorial on W3 schools to learn how to create forms for PHP uploads.

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

The 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 onto my localhost, and execute the up.html file, the PHP produces an output as follows:

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

Unfortunately, I cannot seem to find this /tmp/phpK0YqyL.

Can anyone suggest where this file could possibly be located?

In reality, I would also like to know how one could specify the path to directly upload the file to (presumably this would be somewhere in $_FILES array).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:07:44+00:00Added an answer on May 22, 2026 at 10:07 pm

    The /tmp/ folder is a folder to temporarily store the file for processing or reading.
    If you want to access the file later on, you need to save the file to the server with the move_uploaded_file function

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to learn Asp.net Mvc so I am trying out this Tutorial.
I was trying out this tutorial for reading rss feeds with a php file
I am trying out PHP my first actual script, most of it from tutorial
Came across this error when trying out the ruby on rails tutorial section with
I'm trying out the Flaskr tutorial(http://flask.pocoo.org/docs/) and I got the following error after I
I am following the gallery tutorial and I am trying to figure out how
I am trying out the fantastic Flare toolkit, but following the tutorial almost out
What is the most comprehensive MD5 tutorial out there? I have been trying to
I'm trying to figure out the cleanest way to do this. Currently I have
I'm trying out ASP.NET MVC, but, after reading a huge tutorial, I'm slightly confused.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.