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($handle, 4096);
$buffer = trim($buffer);
if (strlen($buffer) hahahaha 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