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 are variables in research examples?

1037


What is the purpose of constant() function?

1070


Write an example to remove html tags from a string in php?

884


Which function is used in php to check the data type of any variable?

907


How do you explain independent and dependent variables?

860


Explain the different types of errors in php.

1029


What enctype is required for file uploads to work?

982


What is a php namespace?

932


What does csrf token mean?

881


Which php function will attach one file to another?

947


Explain how to execute a php script using command line.

1131


What does $_cookie mean?

951


CWD is a type of shell variable. State Whether True or False?

1061


What is use of in_array() function in php?

1044


Is php developer in demand?

930