Hi!
There is actually no way that you make the require command check the validity of the code in the required file.
The solution is to make all the commands in the requred file functions which returns "true" if everything inside is OK or "false" in the other case. When you "requre" it stil nothing will happen. but the you use some code like this:
if(@my_requre_function()){//it is OK
}
else{//an error has occured while executing the code
}
The "@" before the name of the function tels PHP not to show the error messages. Thus you'll understand if it is ok if the function has returned true. In the other case you can handle the error.
Bob.