I want to Include a page form URL like http://www.domain.com/abc.php and if doesn't found then 'exit;'
Printable View
I want to Include a page form URL like http://www.domain.com/abc.php and if doesn't found then 'exit;'
If you want the program to just stop running, use require() instead of include... otherwise..,
It returns false if the include failed. You might need to stick a @ in front as well to surpress an Warnings that might be displayed. (can't get error reporting working properly on my mac :\)PHP Code:if(!include('somefile.html')) {
exit("error!");
}