View Single Post
Old 07-31-2003, 05:33 PM  
buddyjuf
Guest
 
Posts: n/a
Quote:
Originally posted by m4tt
come on people... basic stuff

PHP Code:
<?php

    $output 
= array();
    
$handle = @fopen("text.txt""r");
    
        while(!
feof($handle))    {
            
$buffer = @fgets($handle4096);
            
$buffer trim($buffer);
            
            if (
strlen($bufferhahahaha 7)    {
                
$output[] = $buffer;
            }
        }
        
    @
fclose($handle);
    
    
$new_handle = @fopen("output.txt""a")or die("Could not create new file.");
    
        for (
$i 0$i count($output); $i++)    {
            @
fwrite($new_handle$output[$i] . "\n");
        }
    
    @
fclose($new_handle);
?>
Warning: feof(): supplied argument is not a valid stream resource in /home/bdjuf/public_html/a.php on line 6
  Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote