I want to write a file using php,where some text are colored.
example:
operation: save. status:passed //its color green
operation:delete. status:failed //its color red
My code is like:
<?php
$myfile = fopen("newfile.txt", "w") or die("Unable to open file!");
$txt = "operation: save. status:passed
";//green color
fwrite($myfile, $txt);
$txt = "operation:delete. status:failed
";//red color
fwrite($myfile, $txt);
fclose($myfile);
?>