以下の違いを理解しようとしています。私が行ったすべての読書は、「インクルード」が機能するはずだと言っています。「なぜ」「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>