What is better: include/include_once or require/require_once? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is better: include/include_once or require/require_once?

1st Sep 2016, 7:32 PM
Ivens Pontes
Ivens Pontes - avatar
2 Answers
+ 2
I prefer to use require_once. But it really depends on you, what you want to do. But the main things that are a must like database connection, then you should always use require_once.
1st Sep 2016, 8:04 PM
Asif Imtiaz Shaafi
Asif Imtiaz Shaafi - avatar
- 2
this is depends on your coding logic. but you should be clear enough between the difference between them.
4th Sep 2016, 8:11 PM
Ayaz Muttaqui
Ayaz Muttaqui - avatar