Home > Backend Development > PHP Tutorial > php readfile download 下载出现1kb,该如何处理

php readfile download 下载出现1kb,该如何处理

WBOY
Release: 2016-06-13 10:13:55
Original
1114 people have browsed it

php readfile download 下载出现1kb
header("Content-type: application/$kind");
   
header("Content-Disposition: attachment; filename=$filename");
   
readfile($requireurl);

为什么 我用以上代码下载 文件都是 1kb呢 ?
allow_url_fopen = On已经 设置了

------解决方案--------------------

探讨

1kb的文件里面是什么内容??或者你readfile读取的文件只有1kb呢

单独运行readfile($requireurl)看输出什么,或者用file_get_contents()代替试试看
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template