11. require vs. include


#1

Other than the syntax I really don't understand the difference or why one would choose one over the other. Can anyone elaborate?

Thanks.


#2

Allready answered in
= http://discuss.codecademy.com/t/include-vs-require/10739/2


#3

@jaydacoder take a look at this article to help you undestand

but the general difference is

require will produce an error (COMPILE ERROR) and stop the script
include will only produce a warning (WARNING) and the script will continue


#4

Thankyou @rydan … Very helpful :smile:


#5

The link shows it's for PHP ?


#6

updated my original post


#7

That was not answered at all. You coldly told the guy to google it...