So you are trying to delete part of a text file? Can you provide some more details? Does the file have a particular organization? How do you determine what needs to be deleted?
can you please help me with this ... i try to make the command but is not working ... is deleting evryting from the log and is remaining just the ip what i need to delet lol ...
PHP Code:
// Delete Text From Logs function deleteText( $log, $ip_address ) { $fp1 = file($log); $fp1 = str_replace($ip_address, '', $fp1); $fp2 = fopen($log, 'w+') or die('ERROR: Open Delet Line'); fwrite($fp2,$fp1); fclose($fp); }