Re: [請益] 麻煩PHP高手幫忙看一下!
※ 引述《yew (程式Orz)》之銘言:
: 請問,我以下面的方法將filedir.txt裡面的內容分開,然後再以表格輸出,這樣寫不知道為什麼就是顯出這樣子=>http://0rz.net/e21DH
: $lines=file("filedir.txt");
: $line[]=$lines[$a];
: for($i=0;$i list($number,$name,$email,$time,$filename,$filelink,$filedescribe)=each(explode("||",$line[$i]));
: 我txt裡面的檔案是xxx||xxx||xxx||xxx 的方式分隔
: 寫入也是以$data="$number||$name||$email||$time||$filename||$filelink||$filedescribe\r\n";
: 這方式寫入,雖然檔案都有寫進去,但是就是顯示不出來,麻煩高手指正
: 謝謝~
把each()拿掉試試
順便告訴你一件事
file()出來的東西
每行後面的換行符號還是會留著
如果有需要你可以用rtrim()把牠去掉
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.62.42.61
※ 編輯: gmobug 來自: 61.62.42.61 (07/26 10:40)
推
07/31 17:52, , 1F
07/31 17:52, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章