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
Explain how to execute a php script using command line.
What are the advantages of triggers?
What is x+ mode in fopen() used for?
What is local variable in php?
What is composer json?
What is abstraction php?
How to set cookies?
What are the difference between echo and print?
Why many companies are switching their current business language to php? Where php basically used?
What is the main difference between asp net and php?
How to display your correct URL of the current web page?
Why super () is used in java?
What is meant by session in php?
How we can declare variable in php?
How is the comparison of objects done in php?