What are the differences between include() and include_once
() functions?

Answer Posted / nishit

file1.php:
function check()
{
echo 'hello nishit';
}
file2.php
include('file1.php');
check();

file3.php
include('file1.php');[this is worn we should use here
include once.]
include('file2.php');
check();

while execute file3.php see what the error:

Is This Answer Correct ?    4 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long does a session last in php?

514


How to remove the new line character from the end of a text line in php?

528


How to get no of arguments passed to a PHP Function?

500


What does mysqli_query return?

520


sort term descripttion form, report and uery

1657






What is Apache's configuration file typically called?

557


How failures in execution are handled with include() and require() functions?

593


What are the 5 types of data?

561


Explain what does the expression exception::__tostring means?

494


What is the meaning of "enctype= multipart/form-data" ?

530


What is cookies php?

522


Explain how you can update memcached when you make changes to php?

562


How to get the number of characters in a string?

567


What does the scope of variables mean?

533


Why are sessions used?

530