Testing - PHP str_replace
in file [1]
<?php
$oldMsg = "black";
$newMsg = "white";
$str=file_get_contents('test.txt');
$str=str_replace($oldMsg, $newMsg,$str);
file_put_contents('test.txt', $str);
?>
str_replace
in file [1]<?php
$oldMsg = "black";
$newMsg = "white";
$str=file_get_contents('test.txt');
$str=str_replace($oldMsg, $newMsg,$str);
file_put_contents('test.txt', $str);
?>