tsv跟csv很像,不过csv是以,分格数据,tsv是以tab分格。
php分析tsv数据:
php分析tsv数据:
$path = "D:\\test.tsv";
if(file_exists($path))
{
$fp = fopen($path,'r');
while (!feof($fp)) {
$str = fgets($fp);
$pieces = explode("\t", $str);
var_dump($pieces);
}
}
else
{
echo "file not exists.";
}