我试图了解以下内容之间的区别。我所做的所有阅读都表明“包含”应该有效。我想知道'为什么'我必须使用'virtual()'和/或我在'include'上做错了什么。
<?php virtual('/path'); ?>
和
<?php include'/path'; ?>
我在下面的代码中同时使用了两者。'virtual()' 工作并用于 header.php。'include'(不起作用)用于footer.php。整个页面的代码如下。 链接到实时页面
<head>
<title>Untitled Document</title>
<link href="/student_sites/2013/web_40/pages/css_includes/css_includes.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="wrapper">
<div id="header"><?php virtual('/student_sites/2013/web_40/pages/css_includes/assets/includes/header.php'); ?>
</div>
<div id="content_wrapper">Content for New CONTENT WRAPPER Div Tag Goes Here
<div id="side_bar">Content for New SIDE BAR Div Tag Goes Here</div>
<div id="content">Content for New CONTENT Div Tag Goes Here</div>
</div>
<div id="footer"><?php include '/student_sites/2013/web_40/pages/css_includes/assets/includes/footer.php'; ?></div>
</div>
</body>
</html>