What are the differences between include() and include_once
() functions?
Answers were Sorted based on User's Feedback
Answer / anjali ashok arote
include()function is more time consuming because of redeclaration is more in include() file ...
where as include_once()function only declare one time...
in include()function refreshment of file is needed many time
but in include_once()function refreshment of page is only one time
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / 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 |
How many days will it take to learn php?
What software is required for php?
what mode to use when creating dirs with mkdir?
What is the use of $_server and $_env?
What is member function?
What is design pattern? Explain all including singleton pattern?
What are the Merits and De-Merits of CURL library ?
What is the difference between ereg_replace() and eregi_replace()?
What is the difference between associative array and indexed array?
What is mysqli php?
what is the importence of session.save_path in Php.ini file and wht changes u've to made before using sesssions in ur php program first time?
How do you measure variables?