Subscriber only lesson.
Sign up to this course to view this lesson.
The require function is another way to add things from other files.
When to use
You would use the require function when an error message that crashes your whole program is needed.
Require is another way to add things from one file to another.
The main difference between it and "include" is that if there's a problem, you'll get an error message and then the entire program will stop.
Hints & tips
- require 'filename.php'
- If there's an error while using require, your whole program will stop.
Lesson notes are only available for subscribers.