用PHP来设置网页导航
说明:
实现的原理是网页中包含一个特定的页,在你的网页中为了实现导航必须加上 '?id=pagename'来显示。
代码如下:
<?
if($id=="home"){
include("yourhomepage.html");
}
elseif($id=="page"){
include("yourpage.html");
}
//假如你的浏览器没有连接到指定的页面,或连接页面出现错误则显示下面的页面。
else{
include("yourpage.html");
}
?>
教程地址:http://www.phprm.com/base/14343ae84d71a1bd1b28fccee3de0c05.html
欢迎转载!但请带上文章地址^^