ob_start();
echo "<pre>";
print_r($content);
echo "</pre>";
$a=ob_get_contents();
$filename = $_SERVER['DOCUMENT_ROOT']."/log-".date("Y-m-d").".txt";
$file = fopen($filename, "a");
$tipmsg = "/r/n******Final File: "
//.end(explode('/',$_SERVER['PHP_SELF']))
.$_SERVER['PHP_SELF']
."/r/n******Code Container: "
.str_replace("//","/",substr(__FILE__,strlen($_SERVER['DOCUMENT_ROOT'])))
."/r/n******Time: "
.date("Y-m-d H:i:s")."/r/n/r/n";
fwrite($file, $a.$tipmsg);
fclose($file);
ob_end_clean();