Page 1 of 1

Difference between include() and require()

Posted: Wed Jul 09, 2003 5:27 pm
by php_wiz_kid
What's the difference between include() and require()? Thanks.

Posted: Wed Jul 09, 2003 5:33 pm
by Galahad
include() will just give a warning if the file can't be opened for some reason, but continue executing. require() will actually halt execution of the script. Here's the manual page. Look at the paragraph starting with " require() and include() are identical in every way except how they handle failure".

Posted: Wed Jul 09, 2003 5:37 pm
by php_wiz_kid
Alright, thanks.