Re: [請益] 麻煩PHP高手幫忙看一下!

看板PHP作者 (泡泡蟲蟲)時間19年前 (2006/07/26 10:38), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #14njMGnx (PHP)
討論串 (同標題文章)
文章代碼(AID): #14njMGnx (PHP)