What is the exact Diff. between include_once() and
require_once() in PHP?
Answer Posted / arvind pippal
. 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.
include_once() should be used in cases where the same file
might be included and evaluatedmore than once during a
particularexecution of a script, and you want to be sure
that it is included exactly once to avoid problems with
function redefinitions, variable value reassignments, etc.
require_once() should be used in cases where the same file
might be included and evaluatedmore than once during a
particular execution of a script, and you want to be sure
that it is included exactly once to avoid problems with
function redefinitions, variable value reassignments, etc.
| Is This Answer Correct ? | 50 Yes | 12 No |
Post New Answer View All Answers
What is string function sql?
Is php a web server?
Echo is used to Display message on screen. Which is used with echo to not output the trailing newline?
Suppose we receive a form submitted by a post to subscribe to a newsletter. This form has only one field, an input text field named email. How would we validate whether the field is empty? Print a message "the email cannot be empty" in this case?
What is the use of anonymous function in php?
How do you compare strings in java?
What is the difference between $message and $$message in php?
How to write a program to make chess?
How to register a variable in PHP session?
How is it possible to cast types in php?
How to read and display a HTML source from the website url?
How does firefox manage cookies?
Explain about PHP filter and why it should be used?
Where are the persistent cookies stored on your computer?
Explain the difference between mysql_connect and mysql_pconnect?