1exit(); // Normal exit
2
3exit(1); // Exit with an error code
4
5exit('Error!'); // Exit and print an error message
1//exit — Output a message and terminate the current script
2<?php
3
4$filename = '/path/to/data-file';
5$file = fopen($filename, 'r')
6 or exit("unable to open file ($filename)");
7
8?>
9
10