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 pdo in php why use?
How can we know the count/number of elements of an array?
What is difference between rest api and restful api?
How to get best php developer Experience in Php with Sugar CRM / VTiger.
What is super keyword in php?
Is php a strongly typed language?
What is meant by nl2br()?
Tell me how do I check if a given variable is empty?
What are the differences between Get and post methods in form submitting, give the case where we can use get and we can use post methods?
Which programming language does php resemble to?
What are the differences between PHP3 and PHP4 versions?
How to read one character from a file?