生成word的代码:
复制代码 代码如下:
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header('Content-type: application/doc');
header('Content-Disposition: attachment; filename="测试.doc"');
复制代码 代码如下:
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Content-type:application/vnd.ms-excel");
Header("Content-Disposition:attachment;filename="测试.xls"');