Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the differences between require and include,
include_once?

Answer Posted / ashwini

All three include(),include_once() and require() are used to
an include file into the current page.

If the file is not present, require(), calls a fatal error,
while in include() does not.

The include_once() statement includes and evaluates the
specified file during the execution of the script. This is a
behavior similar to the include() statement, with the only
difference being that if the code from a file has already
been included, it will not be included again. It does not
call a fatal error if file not exists. require_once() does
the same as include_once(), but it calls a fatal error if
file not exists.

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between explode() or split() in PHP?

958


Write a query to find the 2nd highest salary of an employee from the employee table?

1040


What is composer used for?

954


What is the use of 'print' in php?

1020


How to run a php script?

1020


What is session php?

954


Why post method is used in php?

1113


What is the ioncube php loader?

1028


How can i execute PHP File using Command Line?

993


How to remove blank spaces from the string?

1019


What are the file upload settings in configuration file?

1041


What the use of var_dump()?

1045


What are the advantages of object-oriented programming in php?

931


Which is the latest version of php?

1115


What is ltrim?

925