0

What is the main difference between 'include' and 'require'?

The include and require statements allow for the insertion of the content of one PHP file into another PHP file, before the server executes it.

25th Apr 2019, 5:08 AM
Prodip Kirtania
Prodip Kirtania - avatar
2 Antworten
+ 2
When the desired file doesn't exist, or unreadable `include` gives warning. On the other hand, `require` will produce error and stops script execution. Quoted & summarized from: https://stackoverflow.com/questions/3633900/difference-between-include-and-require-in-php
25th Apr 2019, 5:38 AM
Ipang
0
if failure happen require will produce an error whereas import only give a warning
25th Apr 2019, 5:41 AM
Taste
Taste - avatar