<?php
/**
* Utility function to print a message on stdout
*
* optionaly can stop the program execution ($fatal variable)
*
* @param string $message
* @param boolean $fatal
*/
function printConsole($message, $fatal = false) {
global $output_file, $msgbuffer;
if (!empty($output_file) && !$fatal) {
$msgbuffer .= $message."\n";
} else {
print ( $message . "\n" );
}
if ($fatal)
exit ( 1 );
}
?>
|