September 2001
Intermediate to advanced
768 pages
32h 45m
English
void die(string message) Prints a message and then exits the script.
Returns:
Nothing
Description:
die() displays a message (or calls a function) before exiting the script and then stops parsing of the current script. It is most often used for debugging or providing error handling.
Availability:
UNIX/Linux, Windows
Version:
3+, 4+
See also:
To stop parsing of a script:
exit()
Example:
$URL = 'http://www.php.net/';
$fp = fopen ($URL, 'r')
or die ("Could not connect to site <i>$URL</i>");
|
Read now
Unlock full access