复制代码 代码如下:
<?php
$users = array(
array("用户名","部门","职称");
array("user1","1","秘书处","科员");
array("user2","2","办公室","科员");
array("user3","3","后勤处","科员");
);
$handle = fopen("html/csvfile.csv","w");
foreach($users as $line){
fputcsv($user,$line);
}
//把文件老人家“请来”可要记得“送回去”哦
fclose($handle);
?>
新闻热点
疑难解答