I have a PHP Script that calls a master PHP template (acts as HTML template) with file_get_contents
, replaces a few words from it and then saves the final file as another PHP in a directory.
But the master PHP template itself has include();
and require_once();
in it and the saved file after replacing the words doesn't load the files called from the master template.
The HTML source code of the saved file is with <?php include('file_here'); ?>
in it, but not with the output of file_here -- see image.
How can I call file_get_contents(); and still let the master template execute include(); or require_once(); ?