0

Go here: http://www.tizag.com/phpT/fileupload.php

Under the heading "php - file upload: uploader.php" there are these sentences:-

----$_FILES['uploadedfile']['name'] - name contains the original path of the user uploaded file.
----$_FILES['uploadedfile']['tmp_name'] - tmp_name contains the path to the temporary file that resides on the       server. The file should exist on the server in a temporary directory with a temporary name.

I don't understand these two sentences. Could someone explain?

Warm regards,
Cadence

2
Contributors
3
Replies
5
Views
4 Years
Discussion Span
Last Post by urtrivedi
0

when u upload any file, from your computer say c:\abcfolder\myfile.doc
so myfile.doc will be saved in variable file['name']

when you submit file to upload, this file is copied to temp folder on server say /tmp/xyzzfile

this is stored in file['tmp_name']

u can move this file from temp folder to folder of your choice on ur server by using

move_uploaded_file(file[tmp_name],'/server/myuplodfolder/myfile.doc');

0

I still did not get it.

so myfile.doc will be saved in variable file['name']

What is this

$_FILE['name']

? Not mentioned on the website.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.