Hi,
I'm writing a script where I generate new .php files. Now I need to paste php code into a tamplate document wich I will write to HD.
In the following example the pasting of html is fine, but the php code will be excecuted when copying it into the $content variable wich is filled with html in the template.php file
$file = fopen(newfile.php", "a");
require("template.php"); //contains $content
fputs($file, $content);
fclose($file);
I've tried to use file() and readfile(), but just the word "array" is pasted into the newfile.php, so I use require, wich excecutes BUT return..
Thank you for reading!