当前位置:Gxlcms > PHP教程 > php实现三级导航栏效果

php实现三级导航栏效果

时间:2021-07-01 10:21:17 帮助过:17人阅读

1.数据配置文件 db.php

  1. return array(
  2. array(
  3. 'one' => '关于我们',
  4. 'two' => array(
  5. array(
  6. 'three_tit' => '公司介绍',
  7. 'three_cont' => array(
  8. '企业概况',
  9. '组织架构',
  10. '发展历程',
  11. '企业文化',
  12. '服务理念'
  13. )
  14. ),
  15. array(
  16. 'three_tit' => '企业荣誉',
  17. 'three_cont' => array(
  18. '获奖证书',
  19. '行业贡献',
  20. '资质认证',
  21. '协会活动',
  22. '公司的成就')
  23. ),
  24. array(
  25. 'three_tit' => '销售网络',
  26. 'three_cont' => array(
  27. '东北',
  28. '华北',
  29. '中东',
  30. '华南',
  31. '西南',
  32. '西北'
  33. )
  34. )
  35. )
  36. ),
  37. array(
  38. 'one' => '产品展示',
  39. 'two' => array(
  40. array(
  41. 'three_tit' => '进出口贸易',
  42. 'three_cont' => array(
  43. '数码产品',
  44. '最新能源',
  45. '新鲜水果',
  46. '肉类食品',
  47. '衣服',
  48. '金银首饰'
  49. )
  50. ),
  51. array(
  52. 'three_tit' => '商业服务',
  53. 'three_cont' => array(
  54. '资格认证',
  55. '人才培养',
  56. '热门商品推荐',
  57. '最新科技前沿'
  58. )
  59. )
  60. )
  61. ),
  62. array(
  63. 'one' => '新闻中心',
  64. 'two' => array(
  65. array(
  66. 'three_tit' => '企业动态',
  67. 'three_cont' => array(
  68. '公司新闻',
  69. '新品上市',
  70. '企业动态'
  71. )
  72. ),
  73. array(
  74. 'three_tit' => '行业动态',
  75. 'three_cont' => array(
  76. '媒体聚焦',
  77. '业内关注',
  78. '国内行情',
  79. '国际行情'
  80. )
  81. )
  82. )
  83. ),
  84. array(
  85. 'one' => '联系我们',
  86. 'two' => array(
  87. array(
  88. 'three_tit' => '联系方式',
  89. 'three_cont' => array(
  90. '在线客服',
  91. '通信地址',
  92. '电话传真',
  93. '在线留言'
  94. )
  95. ),
  96. array(
  97. 'three_tit' => '人才招聘',
  98. 'three_cont' => array(
  99. '项目经理',
  100. '助理秘书',
  101. '渠道代理',
  102. '网站工程师'
  103. )
  104. )
  105. )
  106. )
  107. );
  108. ?>

2.index文件
  1. header('Content-type:text/html;charset=utf-8');
  2. // 载入数据
  3. $data = include './db.php';
  4. // 载入html文件
  5. include './nav.html';
  6. ?>

3.nav.html文件
  1. 无标题文档

php

人气教程排行