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?
Is php outdated 2019?
When to use self over $this?
Why do we use htaccess and where?
What is trait in php?
How do I display php errors?
How do I install php and apache on windows 10?
What is strlen php?
Code to upload a file in PHP?
Steps for the payment gateway processing?
How php statement is different from php script?
What are default session time and path?
How to find the length of a string?
How to write in a file in php?
Which of the delimiter is ASP style?