GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  PHP
Go To First  |  Previous Question  |  Next Question 
 PHP  |  Question 23 of 74    Print  
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.




  
Total Answers and Comments: 3 Last Update: September 05, 2009     Asked by: Rasmi ranjan sahoo 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Venu Gopal.M
 

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.



Above answer was rated as good by the following members:
imran7000
September 28, 2006 05:29:41   #1  
Venu Gopal.M        

RE: difference between require() and include()

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.


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 15, 2006 04:35:04   #2  
ankita        

RE: difference between require() and include()
The two constructs are identical in every way except how they handle failure.
 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 1Overall Rating: -1    
September 05, 2009 12:47:29   #3  
ashish.gijare Member Since: February 2009   Contribution: 7    

RE: difference between require() and include()
include() gives an warning but reqiure() gives an error.require halts the page but include dosen't.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape