I really want to know how am I gonna get the full filepath when I upload a file in PHP?
Here\'s my my problem...
I am importing a csv file in PHP. Uploading a fi
The ['name']
refers to the original filename on the users computer. That's no use to you, in particular because it might be empty. (Or it can contain fake values, causing a directory traversal exploit. So, just avoid it.)
You need to use the ['tmp_name']
which is a server-absolute path like /tmp/upload85728
that can be used for fopen()
or move_uploaded_file()
.