Reference »

PmWiki Troubleshooting for Admins

A useful debugging function

function SA_log($string) {
	OW_log($string, 'wiki.obormot.net');
}

function OW_log($string, $hostname) {
	if ($_SERVER['HTTP_HOST'] == $hostname) {
		echo "<pre>";
		if (is_array($string))
			print_r($string);
		else
			echo $string;
		echo "</pre>";
	}
}

This is my version of “scatter printf statements throughout your code”.