Home > php教程 > php手册 > body text

简单的用PHP编写的导航条程序

WBOY
Release: 2016-06-13 12:38:58
Original
1013 people have browsed it

//简单的用PHP编写的导航条程序  
//导航条配置说明:默认显示的是目录名
//如果不愿意使用目录名,请去掉下面一行注释,并修改数组元素
$label=
array("目录1"=>"导航名1","目录2"=>"导航名2","目录3"=>"导航名3");
$ur1=$REQUEST_URI;
while($ur1 != ""){
  $text=basename($ur1);
  //获取文件名
  if(isset($label[$text]))
    {$text=$label[$text]; }
  $link=$ur1;
  $curx= " > $text";
  $komplettx= $curx.$komplettx;
  $ur1=dirname($ur1);
  //获取目录名
}

echo $komplettx;

?>

//在页面中可以用include调用该程序  

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!