ajamil
answered Jul 18 '21 00:00
require() function is used for the including the file , and if file dont exist for given relative or physical path . it will generate error
you can include file which is really needed for execution for later stage.
how to use require() method in php ?
require("config.php");
i am assuming that config.php have all configuration stuff
so it is needed for next code run. so we can use require() function to include it
require() function is indentical in purpose as like include() but it generate if it failed to get the file.