What are the differences between require and include,
include_once?
Answer Posted / ashwini
All three include(),include_once() and require() are used to
an include file into the current page.
If the file is not present, require(), calls a fatal error,
while in include() does not.
The include_once() statement includes and evaluates the
specified file during the execution of the script. This is a
behavior similar to the include() statement, with the only
difference being that if the code from a file has already
been included, it will not be included again. It does not
call a fatal error if file not exists. require_once() does
the same as include_once(), but it calls a fatal error if
file not exists.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
Which php global variable is used for uploading a file?
Write a hello world program using variable?
How to insert an new array element in array?
How is it possible to remove escape characters from a string?
explain php variable length argument function.
Write a program in php to print a table of a number?
How to pass an argument to a function?
what is the current salary package in India for a PHP programmer who has 1.5 years experience
How can cross site request forgery csrf be prevented?
Does csrf token change?
How To Get the Uploaded File Information in the Receiving Script?
Which php function will attach one file to another?
What are the differences between GET and POST methods in form submitting?
What is htaccess in php?
What is the best website to learn php?