I want to make a PHP file that will write text to another file, including some snippets of code. The problem is, I cannot get it to write the PHP part.
I have been trying variations on the following code using combinations of single and double quotes and parenthesis or not. I also tried to use backslashes to escape the quotes or "?". I noticed that if I leave out the first "?" it will echo the string but then of course the PHP won't work.
<?
echo '<? echo ("php works great!"); ?>';
?>
What do I have to do to get this to work?