function exit() php code example
Example: exit and echo php
//exit — Output a message and terminate the current script
<?php
$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
or exit("unable to open file ($filename)");
?>
//exit — Output a message and terminate the current script
<?php
$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
or exit("unable to open file ($filename)");
?>