新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
php如何遍歷CSV類-創(chuàng)新互聯(lián)
這篇文章主要介紹php如何遍歷CSV類,文中介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們一定要看完!
具體如下:
filePointer = fopen( $file, 'r' ); $this->delimiter = $delimiter; } public function rewind() { $this->rowCounter = 0; rewind( $this->filePointer ); } public function current() { $this->currentElement = fgetcsv($this->filePointer,self::ROW_SIZE,$this->delimiter); $this->rowCounter++; return $this->currentElement; } public function key() { return $this->rowCounter; } public function next() { return !feof( $this->filePointer ); } public function valid() { if( !$this->next() ) { fclose( $this->filePointer ); return FALSE; } return TRUE; } } // end class ?>
以上是“php如何遍歷CSV類”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對(duì)大家有幫助,更多相關(guān)知識(shí),歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!
網(wǎng)站題目:php如何遍歷CSV類-創(chuàng)新互聯(lián)
URL網(wǎng)址:http://fisionsoft.com.cn/article/ccdjji.html