您的位置:首页 > 产品设计 > UI/UE

Include and Require

2016-02-18 12:47 411 查看
The include or require statement takes all the text/codde/markup that exists in the specified file and copies it into the file that uses the include statement.

The include and require statements are identical, except upon failture:

require will produce a fatal error and stop the script

include will only produces a warning and the script will continue

So if you want the execution to go on and show users the output, even if the include file is missing, use the include statement.Otherwise, in case of Framework or a complex PHP application coding, always use the require statement to include a key file to the flow of exectution.This will help you avoid compromising your application's security and integrity, just in-case one key file is accidentally missing.

include/require 'filename'
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: