如何在put请求中获取php中的文件名
问题描述:
我知道我们可以使用
file_get_contents("php://input");
但是我如何在put请求中获取文件名?
But how do i get the filename in the put request?
答
文件名未作为请求的一部分发送.如果要在服务器端获取文件名,则必须通过其他方式(即查询参数)将其传递.
Filename is not sent as a part of the request. If you want to get the filename on the server side, you will have to pass it along by other means, i.e. query parameters.