* @link http://aidanlister.com/repos/v/function.file_exists_incpath.php * @param string $file Name of the file to look for * @return mixed The full path if file exists, FALSE if it does not */ function file_exists_incpath ($file) { $paths = explode(PATH_SEPARATOR, get_include_path()); foreach ($paths as $path) { // Formulate the absolute path $fullpath = $path . DIRECTORY_SEPARATOR . $file; // Check it if (file_exists($fullpath)) { return $fullpath; } } return false; } ?>