I have a file named $dir and a string named $line, I know that this string is a complete line of that file but I don\'t know its line number and I
$dir
$line
Like this:
file_put_contents($filename, str_replace($line . "\r\n", "", file_get_contents($filename)));