Home >php教程 >php手册 >用PHP来设置网页导航

用PHP来设置网页导航

WBOY
WBOYOriginal
2016-06-13 10:02:562346browse

说明:

  实现的原理是网页中包含一个特定的页,在你的网页中为了实现导航必须加上 '?id=pagename'来显示。

  代码如下:


if($id=="home"){
include("yourhomepage.html");
}
elseif($id=="page"){
include("yourpage.html");
}
//假如你的浏览器没有连接到指定的页面,或连接页面出现错误则显示下面的页面。
else{
include("yourpage.html");
}
?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn