I try to cache a php file. This php file is just an HTML file with some include and variable in it.
I want to execute this php file one time and then put it in an .html file.
I tried :
ob_start();
include('source.php');
$file_content = ob_get_contents();
file_put_contents('cache.html', $file_content);
ob_end_clean();
It dosn't work because there are some include functions in source.php, the file cache.html is not created and the output of ob_start is visible.
If I remove the include functions in source.php it works well.
Any ideas ?
Thanks