I\'m writing an autoload function and in the inner logic of it would like to test whether a certain file exists somewhere in the path prior to including it.
This is the
I would use file_exists rather than a warnings-suppressed include.
Then you'll have to iterate through the include_path:
include_path
$paths = explode(';', get_include_path()); foreach($paths as $p){ if(file_exists($p . '/' . $calculatedPath)){ include $p . '/' . $calculatedPath; break; } }