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
What are the file upload settings in configuration file?
What is substr() in php? And how it is used?
Explain the casts allowed in PHP?
Explain the different types of errors in php.
Why php script is not running in browser?
Explain me what is the difference between explode() and split() functions?
> symbol is used to redirect the output of a command. State Whether True or False?
Steps for the payment gateway processing?
What is use of count() function in php?
Is php a dying language?
Tell me how is it possible to return a value from a function?
What sized websites have you worked on in the past?
How are php sessions stored?
What is the differences between $a != $B and $a !== $B?
Tell me what is the use of explode() function?