【发布时间】:2018-06-27 05:25:25
【问题描述】:
第一台服务器具有生成文件并为其命名的代码。
header('Content-Type: application/pdf');
header('Content-disposition: filename="i_want_get_it.pdf"');
header('Cache-Control: no-cache');
header("Content-Transfer-Encoding: binary");
readfile(ROOT.'/files/5548951235');
在另一台服务器上,我想获取文件名(代码中的 i_want_get_it.pdf)。我只能使用
获取文件内容file_get_contents('http://some_link.com?act=getfile&id=5548951235')
【问题讨论】:
-
请减少您的 sn-ps 中的制表符以减少水平滚动。
标签: php http-headers filenames file-transfer