本文整理汇总了PHP中error_notice函数的典型用法代码示例。如果您正苦于以下问题:PHP error_notice函数的具体用法?PHP error_notice怎么用?PHP error_notice使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了error_notice函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: error
/**
* Handles error messages
*
* @param int $type The error code
* @param string $message A string describing the error
* @param string $file The filename in which the error occurred
* @param int $line The line number on which the error occurred
* @author Jason Warner <[email protected]>
* @since Beta 2.0
* @return void
**/
function error($type, $message, $file = null, $line = 0)
{
global $set;
// Get the settings!
if (isset($_GET['debug']) || function_exists('error_fatal') || !(error_reporting() & $type)) {
return;
}
include $set['include_path'] . '/lib/error.php';
switch ($type) {
// Triggered Quicksilver Forums errors
case QUICKSILVER_ERROR:
exit(error_warning($message, $file, $line));
break;
// Triggered Quicksilver Forums notices and alerts
// Triggered Quicksilver Forums notices and alerts
case QUICKSILVER_NOTICE:
exit(error_notice($message));
break;
// Database errors
// Database errors
case QUICKSILVER_QUERY_ERROR:
exit(error_fatal($type, $message, $file, $line));
break;
// PHP errors
// PHP errors
default:
exit(error_fatal($type, $message, $file, $line));
break;
}
}
开发者ID:BackupTheBerlios,项目名称:qsf-svn,代码行数:41,代码来源:globalfunctions.php
示例2: error_notices_render
/**
* Returns notices output rendering and reset notices
*
* @return string
*/
function error_notices_render()
{
if (option('debug') && option('env') > ENV_PRODUCTION) {
$notices = error_notice();
error_notice(null);
// reset notices
$c_view_dir = option('views_dir');
// keep for restore after render
option('views_dir', option('limonade_views_dir'));
$o = render('_notices.html.php', null, array('notices' => $notices));
option('views_dir', $c_view_dir);
// restore current views dir
return $o;
}
}
开发者ID:plus3network,项目名称:PHPHelpers,代码行数:20,代码来源:limonade.php
示例3: error_default_handler
/**
* Default error handler
*
* @param string $errno
* @param string $errstr
* @param string $errfile
* @param string $errline
* @return string error output
*/
function error_default_handler($errno, $errstr, $errfile, $errline)
{
$is_http_err = http_response_status_is_valid($errno);
$http_error_code = $is_http_err ? $errno : SERVER_ERROR;
status($http_error_code);
if (($errno == E_USER_NOTICE || $errno == E_NOTICE) && option('debug')) {
$o = "<p>[" . error_type($errno) . "] ";
$o .= "{$errstr} in <strong>{$errfile}</strong> line <strong>{$errline}</strong>: ";
$o .= "</p>";
error_notice($o);
return;
}
return $http_error_code == NOT_FOUND ? error_not_found_output($errno, $errstr, $errfile, $errline) : error_server_error_output($errno, $errstr, $errfile, $errline);
}
开发者ID:sofadesign,项目名称:library.dev,代码行数:23,代码来源:limonade.php
示例4: error
/**
* Handles error messages
*
* @param int $type The error code
* @param string $message A string describing the error
* @param string $file The filename in which the error occurred
* @param int $line The line number on which the error occurred
* @author Jason Warner <[email protected]>
* @since Beta 2.0
* @return void
**/
function error($type, $message, $file = null, $line = 0)
{
if (isset($_GET['debug']) || function_exists('error_fatal') || !(error_reporting() & $type)) {
return;
}
$include = './lib/error.php';
if (!file_exists($include)) {
$include = '.' . $include;
// Admin Center errors
}
include $include;
switch ($type) {
// Triggered Quicksilver Forums errors
case QUICKSILVER_ERROR:
exit(error_warning($message, $file, $line));
break;
// Triggered Quicksilver Forums notices and alerts
// Triggered Quicksilver Forums notices and alerts
case QUICKSILVER_NOTICE:
exit(error_notice($message));
break;
// Database errors
// Database errors
case QUICKSILVER_QUERY_ERROR:
exit(error_fatal($type, $message, $file, $line));
break;
// PHP errors
// PHP errors
default:
exit(error_fatal($type, $message, $file, $line));
break;
}
}
开发者ID:BackupTheBerlios,项目名称:qsf-svn,代码行数:44,代码来源:global.php
示例5: error_notices_render
/**
* Returns notices output rendering and reset notices
*
* @return string
*/
function error_notices_render()
{
if (option('debug') && option('env') > ENV_PRODUCTION) {
$notices = error_notice();
error_notice(null);
// reset notices
if (empty($notices)) {
return '';
}
ob_start();
?>
<div class="lim-debug lim-notices">
<h4> → Notices and warnings</h4>
<dl>
<?php
$cpt = 1;
foreach ($notices as $notice) {
?>
<dt>[<?php
echo $cpt . '. ' . error_type($notice['errno']);
?>
]</dt>
<dd>
<?php
echo $notice['errstr'];
?>
in <strong><code><?php
echo $notice['errfile'];
?>
</code></strong>
line <strong><code><?php
echo $notice['errline'];
?>
</code></strong>
</dd>
<?php
$cpt++;
}
?>
</dl>
<hr>
</div>
<?php
return ob_get_clean();
}
}
开发者ID:enikesha,项目名称:v_order,代码行数:51,代码来源:k_limonade.php
注:本文中的error_notice函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论