doOnTheStart.php 1.1 KB
<?
require_once $__PATH_to_mcClasses .'include.php';
require_once $__PATH_to_mcClasses .'config.php';

/**
 * dinge die am Ende noch ausgeführt werden sollen
 *
 * (nur für Dinge die unter mcClasses sind)
 * 
 * @author f@mensch.coop @since 2010-12-17
 */
if($__mc_ERRORHANDLER) {
	require_once $__PATH_to_mcClasses.'ReportHandling/fnc_mcErrorHandler.inc.php';
	set_error_handler('mcErrorHandler');
}

if($_LOSP_DEV) {
	error_reporting(E_ALL);

	$var_message = '['.date('d. m. Y  G:i').'] DEVMODE: logfile wurde zurvor geloescht';

	if($__mc_D_LOGFILE) {
		unlink ( $__mc_D_LOGFILE );
		mcFile::write($__mc_D_LOGFILE, $var_message, 'w');
	}
//mcFile::write('log/tmp.bla',  date('d.m.Y  G:i:s').': '.$_SERVER['SCRIPT_NAME'].' -- '.$_SERVER['REQUEST_URI'].mcCONST::TAB.($_SERVER['SCRIPT_NAME']==$_SERVER['REQUEST_URI']).mcCONST::LINEBREAK, 'a');
	foreach($__mc_Report as $Report) {
		foreach($Report as $kindofDistribute => $params) {
			if($kindofDistribute == 'toFile') {
				if($params['reset']) {
					unlink ( $params['file'] );
					mcFile::write($params['file'], $var_message, 'w');
				}
			}
		}
	}

	D::start();
}

?>