如何在/about/index.php中包含/master/header.php?
localhost:8888/about/index.php:
<?php
include '/master/header.php';
?>
<?php
include '../master/header.php';
?>
两个点表示返回主文件夹
或者:
include($_SERVER["DOCUMENT_ROOT"] . '/master/header.php');
如何在/about/index.php中包含/master/header.php?
localhost:8888/about/index.php:
<?php
include '/master/header.php';
?>
<?php
include '../master/header.php';
?>
两个点表示返回主文件夹
或者:
include($_SERVER["DOCUMENT_ROOT"] . '/master/header.php');