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

What is the difference between php traits vs interfaces?

918


Explain mail function in PHP with syntax?

964


What is php oops concepts?

967


Difference between mysql_connect and mysql_pconnect?

925


Explain how can we execute a php script using command line?

982


How to convert numbers to strings in php?

960


How can we get the error when there is a problem to upload a file?

945


Explain what is the difference between session and cookie?

986


What sized websites have you worked on in the past?

961


Which operator is used to combine string values in php?

893


What are the characteristics of php?

972


How can we know the total number of elements of Array?

995


Can a trait extend a class php?

933


What is overloading and overriding in php?

1103


What is $_ files in php?

1049