Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要获取用户在 PHP 中上传的文件的绝对路径。我怎样才能做到这一点?我这样做是因为我需要通过 cURL 将信息发布到 API
文件路径存储在$_FILES数组中 - 只适用realpath于那个
$_FILES
realpath
realpath($_FILES['userfile']['tmp_name']);
几点:
is_uploaded_file
move_uploaded_file