I have a file called "DDO" . i write to it and would like to copy it, rename the copied file and move it to a new log directory. How can I do this or is there somewhere I can read about this??
$myFile = "DD";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "Floppy Jalopy\n";
fwrite($fh, $stringData);
$stringData = "Pointy Pinto\n";
fwrite($fh, $stringData);
fclose($fh);
//NOW COPY,RENAME AND MOVE NEWLY RENAMED FILE TO THE LOG DIRECTORY