文件包含

1.文件包含

include 'filename'
    //include出错程序继续执行
require 'filename'
    //require出错程序会停止

1.1包含HTML文件

/*编辑名为one.html文件*/
<!doctype html>
<html lang="en">
<head>
    <title>Document</title>
</head>
<body>

</body>
</html>
//在php中包含
<?php
include 'one.html'
//二者择一
require 'onr.html'
?>

1.2包含php文件

//one.php
<?php
	code;
?>
//two.php
<?php
	include 'one.php'
	require 'one.php'
?>