hunglduc Posted March 20, 2009 Share Posted March 20, 2009 i see the function require() and include() have silmilar features, but error handling, when i use include(), when i use require(), Link to comment Share on other sites More sharing options...
ProblemHelpPlease Posted March 20, 2009 Share Posted March 20, 2009 The include() function will generates a warning (but the script will continue execution). Useful for testing but not ideal to show visitors to your site lots of warning messages.The require() function generates a fatal error (and the script execution will stop after the error). Prevents uses from seeing the warning message but also prevents then from seeing any of your website.It depends on your site and what you want your visitors to see in the event of an error. Persoanlly I find include much easier when building a website as you know which part is causing you the problem and at the end of the day if you have coded correctly then neither message should appear anyway. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.