I found it useful to have a function that can load a file relative to the calling script and return null if the file did not exist, without raising errors. It was easy to modify and just as useful for require/include. The $__FILE__ variable should be filled with the special PHP construct __FILE__: