在我询问我的代码之前,
<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=T1/T2.xls");
header("Pragma: no-cache");
header("Expires: 0");
?>
<table width="100%"" cellpadding="5" cellspacing="0">
<tr>
<td>+62-21-5900755</td>
<td>2017-11-01</td>
</tr>
</table>当我开始运行这段代码时,well正在工作,但我的问题是php上的输出不同。与+62-21-5900755一样,将date更改为-5900714,将date 2017-11-01更改为01/11/2017。如何使我的输出与php上的输入值相同?
找到了解决方案(其实也不是很好),所以在第一个字符串上添加'类型,你就会得到像这些'+62-21-5900755和'2017-11-01这样的格式。谢谢维蒂亚塔。
https://stackoverflow.com/questions/47630924
复制相似问题