PHP代码
1. header(“Pragma: public“);
2. header(“Expires: 0“);
3. header(“Cache-Control: must-revalidate, post-check=0, pre-check=0“);
4. header(“Content-Type: application/force-download“);
5. header(“Content-Type: application/download“);
6. header(“Content-Disposition: attachment;filename=$filename“);
7. header(“Content-Transfer-Encoding: binary “);
或者
PHP代码
1. header(“Pragma: public“);
2. header(“Expires: 0“);
3. header(“Content-Type: application/force-download“);
4. header(“Content-Type: application/download“);
5. header(“Content-Disposition: attachment;filename=$fn“);
6. header(“Content-Transfer-Encoding: binary “);//二进制