Difference between require() and include()

The require() statement includes and evaluates the specific file.
The include() statement includes and evaluates the specified file
include() produces a Warning while require() results in a Fatal Error.

Showing Answers 1 - 3 of 3 Answers

Venu Gopal.M

  • Sep 28th, 2006
 

Hai

if filepath not found .. require() teriminates the program and gives fatal error , but include() not teriminate the program it gives warning msg and continues to program.

ankita

  • Dec 15th, 2006
 

The two constructs are identical in every way except how they handle failure.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions