Blogger Information
Blog 250
fans 3
comment 0
visits 321802
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
利用include和require方法引入文件
梁凯达的博客
Original
1033 people have browsed it

/*

* include '';

* include ('');

* 包含一个没有的文件会报错  报一个warning错误,但是代码继续执行

* require '';

* require('')

* 包含一个没有的文件会报error错误代码不再继续执行

* */

-

//include_once 会有检测功能,如果包含文件了则不不包含,只能检测并只包含一次

//include './function.php';

// include_once './function.php';

// include_once './function.php';

// include_once './function.php';

include_once './func.php';

echo '深圳大哥琦琦';

echo '<hr />';

require_once './function.php';

require_once './function.php';

require_once './function.php';

//包含一个不存在的文件的时候报error错误,代码不再继续执行

//require_once './func.php';

echo '呵呵呵呵'.

//以上的呵呵是不执行的

//require和include的区别

//1.include

//包含一个不存在的文件报warning错误继续执行

//2.require

//包含一个不存在的文件报error错误,代码不再继续执行;


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