Pain Posted January 14, 2012 Share Posted January 14, 2012 Hello. Include is identical to require, only require stops any further script execution. Just wondering if anyone could give me a good example, where 'require' should be used instead 'include'. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/255004-include-vs-require/ Share on other sites More sharing options...
litebearer Posted January 14, 2012 Share Posted January 14, 2012 from http://www.w3schools.com/php/php_includes.asp It is recommended to use the require() function instead of include(), because scripts should not continue after an error. Quote Link to comment https://forums.phpfreaks.com/topic/255004-include-vs-require/#findComment-1307567 Share on other sites More sharing options...
scootstah Posted January 14, 2012 Share Posted January 14, 2012 When you depend on a file being loaded, like class or function files. Quote Link to comment https://forums.phpfreaks.com/topic/255004-include-vs-require/#findComment-1307584 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.