Difference Include and Require in PHP when you are including or requiring a file?

Whats the difference between Include and Require in PHP

Answer:
FOR REQUIRE:
If the file is not found by require(), it will cause a fatal error and halt the entire execution of the script below that line in the code.


FOR INCLUDE:
If the file is not found by include(), a warning will be issued, but execution of the rest of the code will continue as it is.

0 comments:

Post a Comment