Home  >  Article  >  php教程  >  简单的用PHP编写的导航条程序

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

WBOY
WBOYOriginal
2016-06-13 12:38:581022browse

//简单的用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调用该程序  

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