Home > Backend Development > PHP Tutorial > 语句include和require的区别是什么?

语句include和require的区别是什么?

WBOY
Release: 2016-06-06 20:21:07
Original
1459 people have browsed it

语句include和require的区别是什么?

回复内容:

语句include和require的区别是什么?

手册上写的很清楚呀,我复制一下吧

以下文档也适用于 require()。这两种结构除了在如何处理失败之外完全一样。include() 产生一个警告而 require() 则导致一个致命错误。换句话说,如果想在遇到丢失文件时停止处理页面就用 require()。include() 就不是这样,脚本会继续运行。同时也要确认设置了合适的 include_path。注意在 PHP 4.3.5 之前,包含文件中的语法错误不会导致程序停止,但从此版本之后会。

这种问题百度一下就有哦
http://www.jb51.net/article/22467.htm

Related labels:
php
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