Error Handling:: "En" "UTF-8" "Viewport" "Width Device-Width, Initial-Scale 1.0"

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Error Handling:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OOP</title>
    <style>
    body{
        height:100%;
        background:linear-gradient(to right,#67f9c2 0%, #878787 100%);
        color:#000;
        display:flex;
        justify-content:center;
    margin-top:10%;
    font-size:2rem;
    
    }
    </style>
</head>
<body>
<?php

function my_handler($error_level,$error_message,$error_file,$error_line,
$error_context)

      echo "Error :".$error_level,$error_message,$error_file;

      echo "<br/>";

set_error_handler('my_handler');

// error_reporting(E_ALL); 

// echo $temp;

// $r= fopen("ac.txt","r");
// test();

$db=@mysqli_connect(a,$b,$c);

if(!$db){

    trigger_error('database connection failed', E_USER_WARNING);

echo "<br><br>Hello Sir I've Completed The Error Handling Concept";

?>
      
</body>
</html>

OutPut

You might also like