新建header.php,写入:
<?php echo "
<br/>";?>
新建文件footer.php,写入:
<?php echo "
<br/>";?>
新建一个index.php,
,
加载文件时只要
<?php
include './header.php';
echo '显示测试';
include './footer.php';
?>
如果文件放在别的目录下,如下图:
加载文件时只要
<?php
include './Public/header.php';
echo '显示测试';
include './Public/footer.php';
?>