Is there a way to call a function if a include doesn't work? I tried this:
<?php
include("file.php") or error("Could not open file.php!");
function error ($error) {
print "$error";
}
?>
it didn't work though.
It said this: Warning: Failed opening '1' for inclusion (include_path='.:/usr/share/php') in /home/sites/cgi.e3-web.net/users/test.php on line 2
Any ideas?