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's the diff. between include() and Include_once().

Answer Posted / murali

include_once() will not include a file that has already been
included. include() will include a file every time.
include_once() is useful if you have php scripts which
include scripts which include scripts. If 2 of the scripts
include the same file then you might get variables and other
things being overwritten. Using include_once() ensures you
get the functionality that the scripts need but without any
side effects.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what is the static variable in function useful for?

944


How to do single and multi line comment in php?

1003


What is csrf validation?

1085


How to Pass JSON Data in a URL using CURL in PHP?

1063


Is it worth learning php in 2019?

956


What are the 5 types of data?

999


How can we submit form without a submit button?

1016


What is the purpose of pear in php?

1015


what is the scope of php in the future if any other language is developed then may be php is loss ???

14529


Does php have a future?

928


Tell me what are sql injections, how do you prevent them and what are the best practices?

916


What is the use of header in php?

964


What is mysqli_real_escape_string?

989


What is the default session out time?

1078


How to send email using php script?

1039