On Thursday 07 November 2002 18:12, Kerry Kobashi wrote:
> Is there a way to send print_r output to a file?
Try something like this:
ob_start();
if ($title) {
$title = '[' . date('Y-m-d H:i:s') . "]
{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}::$title";
echo "$title\n";
}
if ($message) {
print_r($message);
echo "\n";
}
$tmp = ob_get_contents();
ob_end_clean();
error_log($tmp, 3, "/some/path/or/another/php.log");
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
He thinks by infection, catching an opinion like a cold.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php