Untitled
public text v1 · immutable<?php
$new_filename = "contents with lines.txt
$filename = "with spaces.txt";
$handle = fopen($filename, "rb");
$contents = fread($handle, filesize($filename));
fclose($handle);
$contents = str_replace(' ','
',$contents);
if (fwrite($handle, $content) === FALSE) {
echo "Cannot write to file ($new_filename)";
exit;
}
?>