我正在尝试创建一个这样的 CSV 文件:
Name surname
disha goyal
代码如下:
<?php
$fp = fopen('filse.csv', 'w');
fwrite($fp, 'Name');
fwrite($fp, "\t");
fwrite($fp, "Surname");
fwrite($fp, "\n");
fwrite($fp, 'disha');
fwrite($fp, "\t");
fwrite($fp, 'goyal');
fclose($fp);
?>`
输出是这样的:
Namesurname
dishagoyal