Include vs Require

Include vs Require

Both (include and require) are used for including the files only. But the difference between these two is how they handle if the included file is not found.

Include will produce the warning if the included file is not found and proceed the things.But require will throw the error if the included file is not found and stop the execution.

Above rule is applied for include_once and require_once. But include_once and require_once will include the file only once irrespective of how many times we included the file.

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.