本文整理汇总了PHP中ErrorHandler::setLogSettings方法的典型用法代码示例。如果您正苦于以下问题:PHP ErrorHandler::setLogSettings方法的具体用法?PHP ErrorHandler::setLogSettings怎么用?PHP ErrorHandler::setLogSettings使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ErrorHandler
的用法示例。
在下文中一共展示了ErrorHandler::setLogSettings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: substr
if (substr($class, 0, 4) != 'Dwoo' && substr($class, -4) == 'Data') {
require "php/dwoo/{$class}.php";
} else {
if (substr($class, 0, 2) == 'DB') {
require 'php/sql/' . substr($class, 2) . '.sql.php';
}
}
}
}
spl_autoload_register('class_loader');
/*| error and exception handling |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/
ErrorHandler::setAsHandler($cfg['error_level']);
ErrorHandler::setShowErrors($cfg['error_show']);
ErrorHandler::setMaxArgumentLength($cfg['error_max_arg_length']);
ErrorHandler::setMailSettings($cfg['error_mail'], $cfg['error_mail_subject'], $cfg['error_mail_to'], $cfg['error_mail_from']);
ErrorHandler::setLogSettings($cfg['error_log'], $cfg['error_log_type'], $cfg['error_log_destination']);
ErrorHandler::setFirebugSettings($cfg['error_firebug'], $cfg['error_firebug_collapse']);
/*| database |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/
try {
DB::construct($cfg['db']['engine']);
DB::connect($cfg['db']['host'], $cfg['db']['username'], $cfg['db']['password'], $cfg['db']['port']);
DB::selectDB($cfg['db']['database']);
DB::setPrefix($cfg['db']['table_prefix']);
// i always unset the db password once it is not needed
unset($cfg['db']['password']);
} catch (DBError $e) {
trigger_error("Database Connection Error: " . $e->getMessage());
echo "Database Connection Error. Reload the page to try again.";
exit;
}
/*| template engine |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|*/