I have a PHP app "index.php" that, for various reasons, needs to run other PHP scripts by using include_once
on that other script. That other script isn't very stable, so is there some way to do a safe include_once
that won't halt the caller?
i.e.:
<?php
safely_include_once('badfile.php'); // MAY throw syntax error, parse error, other badness
echo "I can continue execution after error";
?>
(I know what a bad idea this can be, etc., rest assured this isn't production-environment stuff.)