开发者

File uploading - I need to find the absolute (full) path of the tmp_name in PHP

While upload a file i will get the tmp_name开发者_StackOverflow中文版 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜