What is the difference between include and include_once ?
Which is one is good in terms of performance ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between print_r and echo in php?

493


How to avoid the undefined index error?

506


Do you know how to enable error reporting in php?

489


How do I use isdigit function?

558


How many types of functions are there in php?

593






What is difference between readonly and constant?

503


What is the difference between super () and this ()?

543


How to convert strings to upper or lower cases?

556


How many columns can be added in a table in mysql?

494


What does type casting mean in php? Explain with an example?

539


What is cakephp framework?

527


How to support multiple-page forms?

562


How check variable is set or not in php?

454


How to download files from an external server with code in php?

488


What is the actually used php version?

520