Hola a todos; primera vez que recurro a ustedes, espero que me puedan orientar
miren estoy probando redireccionar al momento de existir un error, antes de volcar el buffer de salida he intentado eso pero no funciona bien,
Código PHP:
function Gestor_Errores($num_err, $cadena_err, $archivo_err, $linea_err)
{
switch ($num_err) {
case E_USER_ERROR:
// echo "<script language=\"JavaScript\" type=\"text/javascript\">";
// echo "top.location.href = 'index.error.html.php';";
// unset( $_SESSION['USER'] );
// $_SESSION['GLOBAL']['ERROR'] = TRUE;
// ob_clean();
// ob_start ();
//unset( $_SESSION['USER'] );
$_SESSION['GLOBAL']['ERROR'] = TRUE;
readfile( '../vista/index.error.html.php' );
//header( '../vista/index.error.html.php' );
exit(1);
break;
case E_USER_WARNING:
// echo "<script language=\"JavaScript\" type=\"text/javascript\">";
// echo "top.location.href = 'index.error.html.php';";
// unset( $_SESSION['USER'] );
// $_SESSION['GLOBAL']['ERROR'] = TRUE;
ob_clean();
ob_start ();
//unset( $_SESSION['USER'] );
$_SESSION['GLOBAL']['ERROR'] = TRUE;
header( '../vista/index.error.html.php' );
exit(1);
break;
case E_USER_NOTICE:
// echo "<script language=\"JavaScript\" type=\"text/javascript\">";
// echo "top.location.href = 'index.error.html.php';";
// unset( $_SESSION['USER'] );
// $_SESSION['GLOBAL']['ERROR'] = TRUE;
ob_clean();
ob_start ();
//unset( $_SESSION['USER'] );
$_SESSION['GLOBAL']['ERROR'] = TRUE;
header( '../vista/index.error.html.php' );
exit(1);
break;
}
return true;
}
espero sus comentarios