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
the @ suppresses error messages.
@
you cloud use:
$file = 'script.php'; if(file_exists($file)) include($file);