What is the difference between include and include_once ?
Which is one is good in terms of performance ?
Answers were Sorted based on User's Feedback
u may include a single file several times by using
include() but by using include_once() its ensured tht the
specific file would be included only once no matter how
many times u wrote it ;)
-Abhishek Dilliwal
http://abhishek.x10hosting.com
Is This Answer Correct ? | 13 Yes | 2 No |
Answer / ankit
By Using include() function we can include a file any
number of times.But if you will face a Fatal error that is
a connect() or any function can not be redeclared then just
use include_once(), it will include that file only once,
then it doesn't matter how many times u include that
file. :)
Is This Answer Correct ? | 5 Yes | 3 No |
What is the full form of PHP?
28 Answers Apple, Nandhini, PHP,
•How do you create subdomains using PHP?
What is csrf mvc?
Tell us what is the difference between session_unregister() and session_unset()?
What is call by reference in php?
Explain include(), include_once, require() and require_once?
How to set a page as a home page in a php based site?
Why are sessions used?
How can you "tell" MySQL server to cache a query?
What is sql injection in php?
What is the function of string in c?
What is php? Why it is used?