What is error handling in PHP

In this article I am going to explain about PHP error handling.
  • 1800

PHP Error Handling

Error handling is the process of catching errors raised by your program. In the PHP default error comes with file name with line number.

There are following error handling methods in PHP

  • Through die() function.
     
  • Through custom errors and error triggers.
     
  • Through error repoting.

Example of default error handling

<html>

<body>

<?php

$file=fopen("abc.txt","r+");

?>

</body>

</html>

 

Output:

error php.jpg

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2019 DotNetHeaven. All rights reserved.