A simple navigation bar program written in PHP. A simple navigation bar program written in PHP? Php navigation bar configuration description: by default, the directory name is displayed. if you do not want to use the directory name, remove the following line of comment and modify the array element // A simple navigation bar program written in PHP
// Navigation bar configuration description: the default display is the directory name
// If you do not want to use the directory name, remove the following line of comment and modify the array element.
$ Label =
Array ("directory 1" => "navigation name 1", "directory 2" => "navigation name 2", "directory 3" => "navigation name 3 ");
$ Ur1 = $ REQUEST_URI;
While ($ ur1! = ""){
$ Text = basename ($ ur1 );
// Get the file name
If (isset ($ label [$ text])
{$ Text = $ label [$ text];}
$ Link = $ ur1;
$ Curx = "> $ text ";
$ Komplettx = $ curx. $ komplettx;
$ Ur1 = dirname ($ ur1 );
// Obtain the directory name
}
Echo $ komplettx;
?>
// You can use include to call the program on the page.
Why? Php // navigation bar configuration description: the default display is the directory name // If you do not want to use the directory name, please remove the following line of comment and modify the array element...