把xls文件直接转成csv数据直接导入比较方便
header("Content-type:text/html;charset=gbk");
set_time_limit(0);
$file = fopen('wap0806.csv','r');
$i = 0;
while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容
$i++;
}
fclose($file);
把xls文件直接转成csv数据直接导入比较方便
header("Content-type:text/html;charset=gbk");
set_time_limit(0);
$file = fopen('wap0806.csv','r');
$i = 0;
while ($data = fgetcsv($file)) { //每次读取CSV里面的一行内容
$i++;
}
fclose($file);
转载于:https://www.cnblogs.com/hubudong/p/9585738.html