poe Posted November 26, 2006 Share Posted November 26, 2006 question,what is the difference between:includerequirerequire once Quote Link to comment https://forums.phpfreaks.com/topic/28484-include-require/ Share on other sites More sharing options...
Philip Posted November 26, 2006 Share Posted November 26, 2006 The include() function produces a Warning while require() results in a Fatal Error. In other words, use require() if you want a missing file to halt processing of the page. include() does not behave this way, the script will continue regardless. The require_once() statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the require() statement, with the only difference being that if the code from a file has already been included, it will not be included again.--Taken from the PHP manual Quote Link to comment https://forums.phpfreaks.com/topic/28484-include-require/#findComment-130344 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.