test.php
<?phpheader("Content-type:application/vnd.ms-excel;");
header("Content-Disposition:attachment;filename=test.xls");
echo '1'."\t";
echo '1'."\t";
echo '1'."\t";
echo '1'."\t";
?>
我使用头文件 导出 xls
用phpExcelReader 导入
他却提示 The filename test.xls is not readable 这个文件无法读取
是不是头文件导出会 破坏 xls 文件结构呢?
<?phpheader("Content-type:application/vnd.ms-excel;");
header("Content-Disposition:attachment;filename=test.xls");
echo '1'."\t";
echo '1'."\t";
echo '1'."\t";
echo '1'."\t";
?>
我使用头文件 导出 xls
用phpExcelReader 导入
他却提示 The filename test.xls is not readable 这个文件无法读取
是不是头文件导出会 破坏 xls 文件结构呢?
主要 phpexcelreader 他有1个 条件 过滤 define('IDENTIFIER_OLE', pack("CCCCCCCC",0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1));if (substr($this->data, 0, 8) != IDENTIFIER_OLE) {但是我在 echo '1'."\t";的之前 加入 echo IDENTIFIER_OLE;
虽然会成功但是 excel 的文件 里的内容 就会被破坏 甚至打开不了 xls