php 调试

<?php

function OutputDebug($str)
{
	$f = fopen("E:/debug.txt", 'a');

	$data = "nn" . date('Y-m-d H:i:s', time()) ."n";
	$data .= $str;

	fwrite($f, $data);
	fclose($f);

}

function fprint_r($value='')
{
	$r = var_export ( $value , TRUE) ;
	return $r ; 
}


$a = array ( 1,2, array("a","b","c")) ;

OutputDebug(fprint_r($a));

?>
Advertisements

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s