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

Explain what does the unlink() function means?

541


What is the use of header in php?

524


What is url encoding and decoding in php?

547


What is difference between web service and api?

506


Is time a dependent variable?

510






What is singleton class in php?

529


What are super global variables in php?

517


Write the statements that are used to connect php with mysql

506


Tell me how to set a page as a home page in a php based site?

498


Why use static methods php?

531


What are the advantages of indexes?

494


How to fix "headers already sent" error in php

535


How to connect to mysql from a php script?

553


What does $_server mean?

555


Is learning php easy?

522