What are the differences between include() and include_once
() functions?

Answer Posted / sanjay sharma

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. As the name
suggests, it will be included just once. so include_once() is
better than include().

Is This Answer Correct ?    10 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find datatype of variable in php?

519


What is php routing?

512


Is it possible to use com component in php?

548


How long is a php session valid?

513


How to remove white spaces from the beginning and/or the end of a string in php?

535






Will react hooks replace redux?

508


What is use of header() function in php? What the limitation of header()?

467


Explain about the $_GET variable of PHP?

575


What is Mcrypt used for?

571


Give the case where we can use get and we can use post methods?

554


Where php basically used?

556


Is key exist in array php?

532


Name some of the constants in php and their purpose.

531


What is mean by an associative array?

528


Explain whether it is possible to share a single instance of a memcache between multiple php projects?

511