Whats the difference between include() and require()?
Answer Posted / kathiresan n
You can insert the content of a file into a PHP file before
the server executes it, with the include() or require()
function.
The two functions are identical in every way, except how
they handle errors.
The include() function generates a warning but the script
will continue execution while the require() function
generates a fatal error and the script execution will stop
after the error.
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
Do I need apache for php?
Does php 7 support multiple inheritance?
Are php sessions cookies?
How do you identify independent and dependent variables in regression analysis?
What is get method in java?
Can we run php in apache tomcat?
Explain the differences between get and post methods?
Can age be a variable?
When viewing an html page in a browser, the browser often keeps this page in its cache. What can be possible advantages/disadvantages of page caching? How can you prevent caching of a certain page (please give several alternate solutions)?
Is nan in php?
how to detect a mobile device using php
How can I display text with a php script?
What is the ioncube php loader?
How to remove the new line character from the end of a text line?
What is static in php?