Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


Whats the difference between include() and require()?

Answers were Sorted based on User's Feedback



Whats the difference between include() and require()?..

Answer / 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

Whats the difference between include() and require()?..

Answer / mahidhar

include() produces a Warning message where as require()
gives Fatal Error.

Is This Answer Correct ?    8 Yes 3 No

Whats the difference between include() and require()?..

Answer / priyanka

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 ?    1 Yes 0 No

Whats the difference between include() and require()?..

Answer / shanawar

Both used for connecting to the database. but the main
difference b/w them if we r using include()and the file is
not found then a warring will be occure and script will be
execute.. But in the case of require() a error will occure
and script will be helt........................ Shanawar

Is This Answer Correct ?    1 Yes 12 No

Post New Answer



More PHP Interview Questions

What is strlen php?

0 Answers  


i got this error msg in online... how to solve this problem... i couldnot find out as soon as possible send me answer or idea COULD NOT ABLE TO CONNECT DATABASE . Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2)

3 Answers   Quest,


How to find the index of an element in an array php?

0 Answers  


When to use inquire vs enquire?

0 Answers  


What the use of var_dump()?

0 Answers  






How cookies are trported from browsers to servers?

0 Answers  


How many columns can be added in a table in mysql?

0 Answers  


What are the advantages of php mysql?

0 Answers  


How do I make a reset button in html?

0 Answers  


Why does php start with variables?

0 Answers  


What is the difference between core php and php?

0 Answers  


How to join multiple strings stored in an array into a single string?

0 Answers  






Categories