P粉9523651432023-08-28 16:35:58
Read lines one by one and write all but the matching lines to another file. Then replace the original file.
P粉1077720152023-08-28 10:25:18
$contents = file_get_contents($dir); $contents = str_replace($line, '', $contents); file_put_contents($dir, $contents);