文件上传 - 我需要在PHP中找到tmp_name的绝对(完整)路径

While upload a file i will get the tmp_name in the array, I need to find the absolute (full) path of the tmp_name that means in which path the file is there( like var/www/sample/tmp/phpekIgfr)

Array
(
    [name] => profile.jpg
    [type] => image/jpeg
    [tmp_name] => /tmp/phpekIgfr
    [error] => 0
    [size] => 44288
)

tmp_name will always contain the full path.

/tmp/phpeklgfr points to the uploaded file in the root /tmp directory. It does not reside in /var/www/sample/tmp.

You can change the location PHP stores temporary files in using the upload_tmp_dir php.ini setting.