September 11th, 2000, 08:00 AM
Could someone please tell me what the difference is between include() and require()? I'm never sure which one I should use in a particular situation.
Thanks for clearing this up for me.
September 11th, 2000, 09:40 AM
September 11th, 2000, 10:46 AM
However, since require always put the external code in, should it be less efficient than include?
Like in a script, you have several if statements, depend on which branch the user want to go. In this case, should we use include() in each branch?
http://new.123finder.com/ - Helps you find cool domains for FREE & Registers it for only $14.95/yr
http://www.guideclick.com/ - Qualified webmaster resources (affiliate programs, web design, tips)
September 11th, 2000, 11:05 AM
In a conditional the file should be called with include().
In a loop the file should be called by require() (unless the file name is dynamic and might change.)