I am using XAMPP on Windows. By printing $_FILES[\"file\"][\"tmp_name\"]
, it seems that the temporary file was saved at C:\\xampp\\tmp\\phpABCD.tmp. But I cannot se
php stores all temporary files, that includes uploaded files, in the temporary files directory as specified in the php.ini. Note that for uploads, those files might be removed as soon as the script the file was uploaded to was terminated (so unless you delay that script, you probably won't see the uploaded file). Another reason might be that the file is simply hidden on the file system.
So if you want to see the file, you might want to make sure you see all hidden files in the explorer and delay the script as long as you need to find the file.
You can check where php is currently saving your temp files $_FILES["file"]["tmp_name"]
by printing
sys_get_temp_dir()
Its specified in upload_tmp_dir
in your php.ini file. It is deleted by the system automatically after use.
from http://www.php.net/manual/en/features.file-upload.php#93602, "...the uploaded file will inherit the permissions of the directory specified in the directive upload_tmp_dir
of php.ini
. If this directive isn't set, the default of C:\Windows\Temp is used..."
IF you are asking the file location then it depend on the setting of server. but if you are asking whether it saved first in local system or in server. then answer is it save in temp folder in server.
It saves it at the path specified in $_FILES["file"]["tmp_name"]
, but deletes it after the script is done executing. It's up to you to move the file elsewhere if you want to preserve it.