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

Is key exist in array php?

534


What is good average session duration?

543


What is design pattern? Explain all including singleton pattern?

533


What is super keyword in php?

515


What is rest api in php?

512






How do I sort numbers in php?

537


How to convert one date format into another in php?

483


Is php dead 2019?

539


Explain how can we execute a php script using command line?

502


What is csrf token and how will you add csrf token in ajax?

523


How to call a php function from another php file?

502


What is the maximum size of a database in mysql?

523


Why do we use javascript in php?

524


What is the correct php command to use to catch any error messages within the code?

575


What is session_start () in php?

520