*/$文件=“/”文本.txt“
$text=free(fopen($file,”R“),filesize($file))
$line=expand(”R“,$text)
echo”
($I=0$I<=count($line)$I){
$TXT=expand(”t“,$line[$I])
echo”
]}
echo”。$TXT[0]。".$TXT[1]。".".$TXT[2]。".$TXT[3
//方法2
$content=filegetcontents()測試.txt“)
$arr=explode(”n“,$content)
echo””foreach($varr){
$tmp=explode(”“,$v)
echo”“
echo”“
echo”“
echo”“
echo”“
echo”“
unset($tmp)
}echo“
”。$tmp[0]。"".$tmp[1]。"".$tmp[2]。"".$tmp[3]?!啊盷//實際上,沒有辦法實現(xiàn)file函數(shù),我就不多說了。檢查看,它把讀取的內(nèi)容直接保存到數(shù)據(jù)中,不需要使用擴展功能。
/*
文本格式如下:按如下方式讀取文本文件
1AAAAbbbaCCCA
2AAAABBBBCCCB
3AAAABBBCCCCC
3AAAABBBCCCCC