The code below almost works, but it\'s not what I really meant:
ob_start();
echo \'xxx\';
$contents = ob_get_contents();
ob_end_clean();
file_put_contents($f
Here is an ugly solution that was useful for a problem I had (need to debug).
if(file_get_contents("out.txt") != "in progress")
{
file_put_contents("out.txt","in progress");
$content = file_get_contents('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
file_put_contents("out.txt",$content);
}
The main drawback of that is that you'd better not to use the $_POST variables. But you dont have to put it in the very beggining.