|
-
Jul 11th, 2002, 01:25 PM
#1
Thread Starter
Hyperactive Member
what is going on!!!!!
this script...
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);
for some reason, makes my PHP.EXE memory usager go through the roof (to 250 odd MB).
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 :/
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Jul 11th, 2002, 02:04 PM
#2
not sure why you open it so many times but ok, try closing it after you open it. I see you open it 3 times then never close it until the end.
-
Jul 11th, 2002, 02:43 PM
#3
Thread Starter
Hyperactive Member
woohoo, it worked 
thanks mate
Power to 2000 Electronic Donkeys!
www.edonkey2000.com
I hate case sensitivity... all you get down the M1 is "are we there yet" and "ouch, watch the bumps".
-
Jul 11th, 2002, 02:44 PM
#4
no problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|