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


Please Help Members By Posting Answers For Below Questions

What is the purpose of the '.myi' file extension? What do thes file contain?

723


What is printf in php?

725


Is array empty php?

686


What is magic quotes?

795


Can the value of a constant change during the script's execution?

755


What is the difference between pop3 IMAP and MAPI?

843


Tell me what is the main difference between php 4 and php 5?

756


What are the 3 types of sessions?

769


How to get best php developer Experience in Php with Sugar CRM / VTiger.

4166


What is the major php security hole? How to avoid?

767


What does it mean when it says the csrf token is invalid?

692


What advance thing in php7?

720


Can we run php in apache tomcat?

737


How to generate a character from an ascii value?

772


How easy is php?

717