+ 4
when use require ??
7 Respostas
+ 3
you use require when a program cannot work unless a particular resource is available
+ 1
In another words the difference between include and require is that: if include statement fails script continues, but if require fails than script stops.
+ 1
You should use 'require' when the file is very important in order to run your php script.
For example the file that contains functions for form validation is required otherwise you website will be the victim of SQL injection.
+ 1
require statements allow for the insertion of the content of one PHP file into another PHP file, before the server executes it.
0
More like "require" is a must if you want the info to be displayed, whereas "include" behave like you ll get a container or box however, question is whether you want the box with object inside it or just the empty box.
0
we use require if we want to use a already created php file in our program. unlike include it will throw an error if the file is missing.
0
it gives fatal error and stops the execution