Home php教程 php手册 简单的用PHP编写的导航条程序_php基础

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

May 17, 2016 am 09:06 AM

//简单的用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 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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)