Thursday, 18 June 2020

php include and require

pho include and require
in php page, if require file is not found, it wil stop the execution of remaining and include - if include file is not found, it wll generete error and execute remaing script
include only generates a warning, i.e., E_WARNING, and continue the execution of the script.
require generates a fatal error, i.e., E_COMPILE_ERROR, and stop the execution of the script.
1. include 'filename ';  
2. Or   
3. include ('filename');  
php requirre
PHP require is similar to include, which is also used to include files. The only difference is that it stops the execution of script if the file is not found whereas include doesn't.
1. require 'filename';  
2. Or   
3. require ('filename');  



No comments:

Post a Comment