this script...
for some reason, makes my PHP.EXE memory usager go through the roof (to 250 odd MB).PHP Code:$filename = "../texts/iplog.txt";
$fp = fopen($filename,"r") or die("Couldnt Open $filename");
while(!feof($fp)) {
$line = fgets($fp,1024);
$backlog[] = $line;
}
$filename = "../texts/iplog.txt";
$fp = fopen($filename,"w") or die("Couldnt Open $filename");
fwrite($fp,"");
$filename = "../texts/backlog.txt";
$fp = fopen($filename,"a") or die("Couldnt Open $filename");
$y = 0;
$s = (count($backlog)-1);
while($y < $s) {
fwrite($fp,"$backlog[$y]");
$y++;
}
fclose($fp);
I have no idea why, to me thats simple code that ios easy to follow and should work!!!! am i missing osmething?
this is the second tim ei have re-written the script and it still dont work :/




Reply With Quote