What is die in PHP
In this article I am going to explain about PHP die function.
PHP error handling with die() function
You can explicitly handle error by in-built die function in PHP.
Syntax of die function
Example of die function
<html>
<body>
<?php
if(!file_exists("abc.txt"))
{
die("The file is not available !");
}
else
{
$file=fopen("abc.txt","r");
}
?>
<body>
<head>
|
Output:

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