I've always used include, but now I want to know the difference between include, include_once, require, and require_once. Can anyone provide some information?
Thanks
I've always used include, but now I want to know the difference between include, include_once, require, and require_once. Can anyone provide some information?
Thanks
include includes a file and produces a warning if it doesn't find it.
require is the same except is produces a fatal error if it can't find it
the once version simply ignore future includes/requires for the same file and allow lazy code structures.
Of course this is explained very simply in the manual at www.php.net/manual/en/function.include.php why not have a look?
Sure thanks