TomTees Posted October 2, 2010 Share Posted October 2, 2010 Why would I want to use include() vs. require() ?? (It seems like most people use "include()", but I would think "require()" would be better/safer...) TomTees Quote Link to comment https://forums.phpfreaks.com/topic/214990-include-vs-require/ Share on other sites More sharing options...
ignace Posted October 2, 2010 Share Posted October 2, 2010 Using require() isn't safer then using include() as they are technically the same except require() will halt the script if it can't find the file. Quote Link to comment https://forums.phpfreaks.com/topic/214990-include-vs-require/#findComment-1118361 Share on other sites More sharing options...
TomTees Posted October 2, 2010 Author Share Posted October 2, 2010 Using require() isn't safer then using include() as they are technically the same except require() will halt the script if it can't find the file. But isn't that better? TomTees Quote Link to comment https://forums.phpfreaks.com/topic/214990-include-vs-require/#findComment-1118364 Share on other sites More sharing options...
PFMaBiSmAd Posted October 2, 2010 Share Posted October 2, 2010 If a file your application is expecting to include/require does not exist, you have bigger problems to worry about than if your code halts or not. Quote Link to comment https://forums.phpfreaks.com/topic/214990-include-vs-require/#findComment-1118365 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.