websteralex
New Member
- Messages
- 3
- Reaction score
- 0
- Points
- 0
well i just learn that the both do the same but what is the difference?
thx dude. i always use include and never know what require does.Error handling is performed differently. If the include() function can not find the file you’ve specified, it’ll throw a warning and execution of the script will continue. The require() function will throw a fatal error, which will halt execution all together.
The php.net documentation would be good for further reading on the include and require (as well as include_once and require_once) functions.