我正在使用以下内容:
@header("Cache-Control: no-cache, must-revalidate");
@header("Content-Type: application/octet-stream");
@header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
@header("Content-Length: ".$row['file_size']);
@header("Content-Disposition: attachment; filename=\"".$row['artist'] . " - " .$row['title']."\"");
@header("Content-type: audio/mpeg;\r\n");
开始下载,现在由于某种原因它给了我
警告:readfile(http://theurl.com/downloads/the file some spaces.mp3) [function.readfile]: failed to open stream: HTTP request failed!HTTP/1.1 404 Not Found in /home/belgin/public_html/dl.php on line 29
现在 url 是有效的,我已经检查了三次,但可能是因为文件名中有空格吗?如果是这样,我该如何解决?谢谢
重新归档行:
readfile(http://domain.com/downloads/Warp 1.9_The Bloody Beetroots_320000.mp3)