Blogger Information
Blog 42
fans 0
comment 0
visits 15670
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0812 include, require区别
小言
Original
317 people have browsed it

include, require区别,除了处理内容上面不同。其它都是一样的。

1.include 如果运行出错以后,会忽略当前错误,继续执行

  1. //相对路径
  2. include 'inc/f2.php';
  3. //绝对路径
  4. include __DIR__ .'/inc/f2.php';
  5. `

2.require,当遇到错误的时候 自动退出结束当前执行内容

  1. require __DIR__ .'/inc/f2.php';

类成员

1. 实例成员: 用对象访问, $this->对象引用

2. 静态成员 static: 用类访问, self::->类引用

Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:多结合实例
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post