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 7030567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:41:17+00:00 2026-05-28T00:41:17+00:00

I am using PHP to upload a file. The upload seems to be successful.

  • 0

I am using PHP to upload a file. The upload seems to be successful. The $_FILES array is:

Array ( [image] => Array ( [name] => mount.jpg [type] => image/jpeg [tmp_name] => /tmp/php61qYZj [error] => 0 [size] => 28947 ) )

Everything seems to be in order. However, when I do

echo '<img src="' . $_FILES['image']['tmp_name'] . '" />';

it gives me a broken image.

This is so basic, how can it possibly be failing?

  • 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-28T00:41:17+00:00Added an answer on May 28, 2026 at 12:41 am

    $_FILES['image']['tmp_name'] is a temporary storage and works for only one request. It is not available from web as long as it usually located at OS directory for temporary files /tmp. You need to move the file to some permanent storage which is available form web.

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

Sidebar

Related Questions

I am trying to upload file using php. I am using the function move_uploaded_file.
I'm using PHP to upload an image from a form to the server and
I am using this PHP code: if (isset($_GET['c'])) { $pages = array(home, upload, signup);
I need to upload a given image using Amazon S3 I have this PHP:
I am doing a file upload using PHP, which works fine for a file
Living in 2012 I did not think a image upload using PHP would cause
I'm using class.upload.php to upload images to a page. It seems a script that
I am using php and i have written codes to allow a user upload
I want to upload and store video files to my server using PHP. Could
Is there any way to upload an entire folder using PHP?

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.