I have file 123.php which produces dynamic information upon excecution and need 123.php to copy it's output to file "abc.txt" How would I go about this in a unix environment?

Thanks in Advance!

fopen, fwrite, fclose or even simpler, file_put_contents.

Member Avatar

diafol

fopen, fwrite, fclose or even simpler, file_put_contents.

Ditto:

looks at this - amazing!

Below is what ended up working for me on my BSD box!

<?php
$fileHandle = fopen('/usr/local/myface/youtweet.txt', 'w+')
 OR die ("Can't open file\n");

$faceit = "got to love myfaceyoutweet.com";

fwrite ($fileHandle, $faceit);

fclose ($fileHandle);//CLOSE FOPEN 
?>