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
@include($file);
Using at in front, ignores any error that that function might generate. Do not abuse this as IT IS WAY SLOWER than checking with if, but it is the shortest code alternative.