php 使用php导出xls文件并提示下载另存

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 “);//二进制

相关内容:

发表评论

您的电子邮箱不会被公开。 标记为 * 的区域必须填写

*


您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

有人回复时邮件通知我