Home > Backend Development > PHP Tutorial > Column navigation program implemented by php code

Column navigation program implemented by php code

怪我咯
Release: 2023-03-14 07:04:02
Original
4101 people have browsed it

Website MainNavigation is located at the top of the website. Usually the main navigation of the website mainly includes the homepage and product columns of the website and the incoming links of each single page. It is convenient for users to reach different web pages in the fastest and easiest way! At the same time, it also facilitates users to discover the main information of the website at a glance without having to search hard!

From the perspective of user experience: Under normal circumstances, the columns or single pages on the navigation are the most important and indispensable content of the website. They are also the most important content that the webmaster hopes to have in addition to the homepage. Some pages you want others to click on or some information you want others to know.

From the perspective of search engine optimization, the main navigation of the website is located in the most important part of the F area of ​​the optimized website, and is the most important part of the search index It is a position with high importance and weight. At the same time, the product news column and the import links of each single page are also laid out on the main navigation of the website (reflow settings between each secondary column), which is the core part of setting up the reflow of the entire website. .

So whether it is considered from the perspective of user experience or search engine optimization, the main navigation of the website is an indispensable part of a website.

<?php
$d_label=array("service"=>"有偿服务","teach"=>"家教中心","union"=>"校园服务联盟","job"=>"学生兼职","free"=>"信息库");
$directory=$REQUEST_URI;
while($directory!="/")
{
  $d_text=basename($directory);
  if(isset($d_label[$d_text])){$d_text=$d_label[$d_text];}
  $d_link=$directory;
  $d_curx="-><a href=\"$d_link\">$d_text</a>";
  $d_komplettx=$d_curx.$d_komplettx;
  $directory=dirname($directory);
}
  echo "栏目导航:".$d_komplettx;
?>
Copy after login

The above is the detailed content of Column navigation program implemented by php code. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template