所以我有一個PHP文件看起來像這樣的菜單創建一個PHP菜單,突出當前標籤頁
menu.php(這是整個文件我是全新到PHP。):
<li id="current"><a href="#"><span>Home</span></a></li>
<li><a href="http://blog.me.net/"><span>Blog</span></a></li>
<li><a href="http://www.me.net/R"><span>Results</span></a></li>
<li><a href="http://www.me.net/P"><span>Pictures</span></a></li>
<li><a href="http://www.me.net/O.html"><span>Our Location</span></a></li>
現在,在我的網頁我這樣做(的index.php):
<div id="tabs1" >
<ul>
<!-- CSS Tabs -->
<?php include("menu.php"); ?>
</ul>
</div>
所以我希望能夠做的是改變上面這行:
<?php include("menu.php?current=pictures"); ?>
這將使活動選項卡圖片選項卡。我怎樣才能做到這一點?
離開'include(「menu.php」);'然後在'index.php'通過URL傳遞參數'?current = pictures'然後使用變量可能會更好? – 2010-02-07 08:59:53