Include and require statements are a way to dynamically include and require files in a PHP script. They can be used to load libraries, frameworks, or other PHP scripts.
The use of this construct has various benefits for programmers and developers. It ensures that all source code is available in one place so that it can be edited easily. It also helps programmers avoid loading unused code unnecessarily.
When an error occurs, the need() method will stop the script from running. There is no fatal error while using the include() function. When the file is not necessary and the application should continue to run even if the file is not discovered, the include() function is commonly used.
The only difference between the two is that if the file is not found, need and its sibling require once throw a fatal error, whereas include and include once just display a warning and continue to load the rest of the page.
Learner's Ratings
4.2
Overall Rating
63%
21%
7%
5%
4%
Reviews
B
Boobalan A
5
I want this course for english. Classes are superb. but not understand few places, because I don't know hindi.
A
abhay
5
best course
A
Anish Narang
5
Best Course in Market till now
N
Nitish Kumar Sharma
4
Meet Shah is the worst teacher i have found in learnvern platform please replace his video with some other teacher he is unable to explain concept properly and sometimes he explain concept incorrect.
S
Sonu sonu
5
very good
I
Islam Web
5
Nice
R
Ravi Ranjan Tiwari
5
I am very happy that I am studying from LearnVern.
Share a personalized message with your friends.