I want to make a cms which generates html pages and creates files to store each page.
Ideally i need something like that:
<?php
$file1 = get_produced_html_from('mainPage.php');
/* write the file to a directory*/
$file2 = get_produced_html_from('ProductsPage.php');
/* write the file to a directory*/
?>
Is there any function i missed instead of require, include, require_once, include_onse etc?
To clarify: I don't need the php code inside the .php file. I need the html content only which means that the php file should be executed first.
Do you believe the solution is something like using http://php.net/manual/en/function.file-get-contents.php by reading http://domain.com/templates/mainPage.php as a html stream?
Thank you a lot.