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 |
Explain what is the difference between $var and $$var?
What is abstract class php?
What is a php session?
Difference between mysql_connect and mysql_pconnect?
what mode to use when creating dirs with mkdir?
What is the use of explode() function?
What are the differences between GET and POST methods in form submitting?
What function do we use to find length of string, and length of array?
Do loops php?
Tell me what does accessing a class via :: means?
what is nl2br?
What is MVC structure in Magento?