答案:网页托管问题。
这是我的代码
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="description" lang="en" content="Test Website " />
<meta name="author" content="">
<link rel="stylesheet" type="text/css" href="css/style.css">
<title</title>
</head>
<body>
<section id="wrapper">
<?php include('includes/topHeader.php'); ?>
<?php include('includes/leftSide.php'); ?>
<?php include('includes/middleSide.php'); ?>
<?php include('includes/rightSide.php'); ?>
</section>
<?php include('includes/foot.php'); ?>
</section>
</body>
</html>
质疑其他php文件没有出现在主页面中?
创建它我已经使用这个网站了 http://www.1stwebdesigner.com/css/how-to-create-php-website-template/
更新 查看源代码显示:
<section id="wrapper">
<!--?php include('../includes/topHeader.php'); ?-->
<!--?php include('../includes/leftSide.php'); ?-->
<!--?php include('../includes/middleSide.php'); ?-->
<!--?php include('../includes/rightSide.php'); ?-->
</section>
<!--?php include('../includes/foot.php'); ?-->
答案 0 :(得分:1)
您正在使用include
功能,请确保:
file_exists
功能答案 1 :(得分:0)
除了已经提出的建议外,还要快速说明。尝试
<?php include('../includes/topHeader.php'); ?>
<?php include('../includes/leftSide.php'); ?>
<?php include('../includes/middleSide.php'); ?>
<?php include('../includes/rightSide.php'); ?>
我这样说是假设include文件夹位于文件夹结构中当前文件的上方。