Beaten to the submit button again...
However, it is possible for an include file to return a value and have it tested. The code from the 1st post here is straight out of the PHP manual (and I just confirmed this works on my test setup.)
So, this should work, assuming the file is being parsed as PHP code (either a .php extension or that the .html extension has been added to the list of files parsed as PHP.)
If the include file is something like this -
and the code that includes it is this -
the resultant output will be -
OK
this is a
This assumes that the path to the include file is correct, along with all of the other things that could normally prevent this from working.