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

How to redirect https to http url and vice versa in .htaccess?

1047


Why do you need php?

1043


Write a program using while loop?

1084


What are php data types?

1032


How to assigning a new character in a string using php?

1280


What is the use of magic function in php?

1022


Which is the best web server?

1009


Explain what is the use of "echo" in php?

1069


How can you compare objects in php?

1003


Is php class name case sensitive?

1025


What is PHP's configuration file called?

1231


Is php a low level language?

1026


How is csrf token generated?

1042


What are the new features available in php 7?

1048


With a heredoc syntax, do I get variable substitution inside the heredoc contents?

1163