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

what is CURL?

795


Why do we use session?

746


What percentage of websites use php?

750


Is php used in 2019?

732


What is interface? Why it is used?

745


Explain what does the function get_magic_quotes_gpc() means?

716


Can you specify the "new line" character in single-quoted strings?

751


What is array filter in php?

760


Why do we use php?

735


Can we extend two classes in php?

749


What is the importance of php?

734


What is csrf validation?

788


What is difference between mysql_connect and mysqli_connect?

718


How to find current date and time?

747


How to process the uploaded files?

819