捕获错误后,PHP/Apache继续执行

捕获错误后,PHP/Apache继续执行,php,.htaccess,exception,error-handling,Php,.htaccess,Exception,Error Handling,大家好,我有一个处理程序错误: .htaccess: # Control de Errores php_value auto_prepend_file "./server/conferror.php" # Disable directory browsing Options -Indexes # Hide the contents of directories IndexIgnore * # Hide files of type .png, .zip, .jpg, .gif and .doc

大家好,我有一个处理程序错误:

.htaccess:

# Control de Errores
php_value auto_prepend_file "./server/conferror.php"
# Disable directory browsing 
Options -Indexes
# Hide the contents of directories
IndexIgnore *
# Hide files of type .png, .zip, .jpg, .gif and .doc from listing
IndexIgnore *.png *.zip *.jpg *.gif *.doc *.pdf *.txt *.jpeg
# Allow access to php files
<Files *.php>
    allow from all
</Files>
#控制消除错误
php\u值自动\u前置\u文件“/server/conferror.php”
#禁用目录浏览
选项-索引
#隐藏目录的内容
IndexIgnore*
#从列表中隐藏.png、.zip、.jpg、.gif和.doc类型的文件
IndexIgnore*.png*.zip*.jpg*.gif*.doc*.pdf*.txt*.jpeg
#允许访问php文件
通融
conferror.php:

<?php
declare (strict_types = 1);
ini_set('session.gc_maxlifetime', '0');
ini_set('session.use_only_cookies', '1');
ini_set('session.cookie_httponly', '1');
ini_set('allow_url_fopen', '1');
ini_set('allow_url_include', '1');
ini_set('error_reporting', '1');
ini_set('display_errors', '0');
error_reporting(E_ALL);
register_shutdown_function("ShutdownHandler");
set_exception_handler("ExeptionHandler");
set_error_handler("ErrorHandler");
function ShutdownHandler() {
    $CheckError = error_get_last();
    if ($CheckError != null) {
        ob_clean();
        $File = $CheckError['file'];
        $Line = $CheckError['line'];
        $Desc = $CheckError['message'];
        echo 'ShutdownHandler:<br><b>Archivo:</b> ' . $File . '<br><b>Línea :</b> ' . $Line . '<br><b>Descripción:</b><br>' . $Desc . '<br>';
        exit();
    }
}
function ErrorHandler($error_level, $error_message, $error_file, $error_line, $error_context) {
    ob_clean();
    $File = $error_file;
    $Line = $error_line;
    $Desc = $error_message;
    echo 'ErrorHandler:<br><b>Archivo:</b> ' . $File . '<br><b>Línea :</b> ' . $Line . '<br><b>Descripción:</b><br>' . $Desc . '<br>';
    exit();
}
function ExeptionHandler($e) {
    ob_clean();
    $File = $e->getFile();
    $Line = $e->getLine();
    $Desc = $e->getMessage();
    echo 'ExeptionHandler:<br><b>Archivo:</b> ' . $File . '<br><b>Línea :</b> ' . $Line . '<br><b>Descripción:</b><br>' . $Desc . '<br>';
    exit();
}

我没有看到任何
ob\u start
调用,是什么让你认为你的输出被缓冲了?我知道输出没有被缓冲。。。但是当系统检测到错误时,不要清理正常的输出数据。我没有看到任何
ob_start
调用,是什么让你认为你的输出被缓冲了?我知道输出没有被缓冲。。。但neet在系统检测到错误时会清除正常的输出数据