textfile??????
| From: | Muhv | Date: | Tue, 31 Jul 2001 08:17:53 +0000 |
| Subject: | textfile?????? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-60353@lists.php.net to get a copy of this message | ||
Hi
Why this code will make empty line between each text line???
$linkFile='link.txt';
$links=file($linkFile);
$fs=fopen($linkFile,'w+');
for ($i=0; $i<count($links); $i++){
if (count(explode(',',$links[$i]))==4){
$fout=fwrite($fs,$links[$i]);
}
}
fclose($fs);
Same file before:
-------------------------------------------------------
http://www.mp3.com,MP3 Site,Official mp3 site,0
http://www.winamp.com,Winamp,Winamp - MP3 Player,0
-------------------------------------------------------
,and after running this script several times:
-------------------------------------------------------
http://www.mp3.com,MP3 Site,Official mp3 site,0
http://www.winamp.com,Winamp,Winamp - MP3 Player,0
-------------------------------------------------------
I dont want those emty lines!!!!!
Help please!!!!
-----------------------------------------
Meeldetuletused kalendrist sms-lühisõnumina. Uuri järgi!
http://www.hot.ee