Require и include без различий | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grátis
- 1

Require и include без различий

Написано что отличаются тем, что в require если файл будет не найден, будет выводится ошибка. В случаи с include, ошибки не будет. Я решил проверить, и что в include что в require выводится ошибка если файл не найден )

6th Jan 2022, 8:38 PM
Max Voices
Max Voices - avatar
2 Respostas
+ 1
When include() is used, we get some warnings, but the code continues its work. When require() is used, we get warning plus fatal error which stops the code's work. Any code following the failing require() line will not be processed. Please put PHP in the tags for the sske of context clarity ☝
7th Jan 2022, 6:20 AM
Ipang
+ 1
Thanks ))) I understood)))
7th Jan 2022, 6:17 PM
Max Voices
Max Voices - avatar