我使用了以下代码来生成zip
// push to download the zip
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');
readfile($zip_name);
这段代码运行得很好,但由于未知的原因,直到我尝试后才能运行
// push to download the zip
header('Content-type: application/zip');
header('Content-Disposition: attachment; filename="'.$zip_name.'"');
echo file_get_contents($zip_name);
我很想知道这两种情况下发生了什么。
https://stackoverflow.com/questions/20095175
复制相似问题