• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP error_notice函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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> &#x2192; 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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP error_out函数代码示例发布时间:2022-05-15
下一篇:
PHP error_no_permission函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap