file_exists() or is_readable()

Viewed 15244

Which one should you use when you want to include a PHP file?

if(file_exists($file) require "$file";

or

if(is_readable($file) require "$file";

?

4 Answers
Related