Results 1 to 4 of 4

Thread: what is going on!!!!!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312

    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".

  2. #2
    scoutt
    Guest
    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.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    May 2001
    Location
    England
    Posts
    312
    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".

  4. #4
    scoutt
    Guest

    Thumbs up

    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
  •  



Click Here to Expand Forum to Full Width