What are the differences between require and include,
include_once?

Answer Posted / tina

require - including a file/page ,if file doesn't exist,then
it gives error and doesn't execute.

include-including a file/page,if file doesn't exit,then it
gives warning and begin to execute.

include_once-including file/page, if it didn't been already
included,it includes else it won't.

Is This Answer Correct ?    41 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does mysqli_query return?

519


Is php 7 backwards compatible?

596


Is python similar to php?

548


How to turn on the session support?

571


How can we access the data sent through the url with the post method?

505






Tell me what is the use of "ksort" in php?

554


What is fetch array in php?

573


What is the difference between php4 and php5?

567


What are the uses of implode() function?

568


How to know user has read the email-php?

495


Explain Traits in PHP?

529


Is php free to use?

536


Explain what does $_files means?

555


Why do we use namespace in php?

461


Code to open file download dialog in PHP?

550