【发布时间】:2015-10-24 18:37:03
【问题描述】:
我正在尝试建立一个具有不同页面的网站。
我是 PHP 新手,我有一个索引页,其中包含用于保存页眉、导航菜单、主体、侧边栏和页脚的某些表格。索引页使用include("filename.extension"); 附加到其中的所有上述元素。问题是我试图在菜单更改时动态加载网站的主体,即内容。
以下是我的代码,对此的任何建议都非常值得赞赏。提前致谢。
<body>
<div> <?php Include('header.php'); </div>
<div id="menu" align="center">
<table width="790" height="35">
<tr>
<td>Home</td>
<td><a href="pages/students/reg.php">Register</a></td> // this page need to display on the same window with other elements, after click.
</tr>
</tabel>
</div>
<div id="sidebar" align="right"> <?php include ("sidebar.php");?> </div>
<div id="Content ">
<?php include("FILE"); // here i need to display the hyper linked page.?>
</div>
<div id="footer"> <?php include("footer.php");?> </div>
</body> `
【问题讨论】:
-
帮助我们帮助您,包括您当前的代码。
-
我认为这是一个服务器问题(Apache、Nginx 或任何你使用的)。试试这个帖子:stackoverflow.com/questions/7264014/…、stackoverflow.com/questions/12142172/…、stackoverflow.com/questions/5121495/…