What is the exact Diff. between include_once() and
require_once() in PHP?
Answer Posted / vineet kumar saini
1.include() includes a file in memory no matter if it has
already been loaded
2.include_once() includes a file in memory only if it has
not been loaded already
3.require() includes a file in memory no matter if it has
already been loaded. if the file cannot be loaded, the
script is aborted
4.require_once() does the same as require(), but only if the
file hasn't been included yet. if the file's already in
memory, it has no effect.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to define a user function?
What does PEAR stands for?
How would you open a directory for reading in php?
Explain the differences between get and post methods?
How we get ip address of client, previous reference page etc?
What does php mean?
Tell me how do you execute a php script from the command line?
What is singleton design pattern in php?
What is the most common http method?
Does php support function overloading?
How to make a class in php?
What is Apache's configuration file typically called?
How do you create an array in php?
Can constructor be private in php?
How to set a page as a home page in a php based site?