The difference between PHP include and require

WBOY
Release: 2016-07-29 09:08:55
Original
753 people have browsed it

Tonight we will talk about the difference between include() and require() in PHP system functions. We often use these two methods. Normally, their

differences are not reflected. Yes, but once an unexpected situation occurs, the difference will immediately appear. Let’s talk about it in detail below.

         include(): In English, it means to include. It is often used to introduce a file into a page or include another page. When the imported file

does not exist, the system will prompt An error, but the program will still continue to execute ;

require(): Literally, it means request or need, and is often used to introduce a file on the page, but when the file does not exist , the process

program will no longer continue to execute, and will terminate execution.

I believe you will never have any doubts about these two methods in the future. It is very simple. Well, the sharing ends here. If it is useful, just tip. Thank you!

PHP include与require的区别

The above introduces the difference between PHP include and require, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!