I need an include function / statement that will include a file only if it exists. Is there one in PHP?
include
You might suggest using @include bu
@include
Based on @Select0r's answer, I ended up using
if (file_exists(stream_resolve_include_path($file))) include($file);
This solution works even if you write this code in a file that has been included itself from a file in another directory.