码迷,mamicode.com
首页 > 其他好文 > 详细

Include and Require

时间:2016-02-18 13:37:53      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

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‘

Include and Require

标签:

原文地址:http://www.cnblogs.com/forerver-elf/p/5197831.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!