Tuesday 15 January 2013

html - php class="active" error with navbar -


I'm looking for several ways to activate a tab with one click using PHP, which includes the number on every page Includes a function to add a bar and PHP is used to activate the clicked link, so here it is that I have an error or problem, it will appear before the word of the house and another tab So, this code is ... P for main nbarbar HP File .. This is included in the HTML using a PHP function:

     Function echoactive classifier [ms] ($ request ury) {$ current_file_name = basename ($ _ server ['REQUEST_URI'], ".php"); if ($ current_file_name == $ requestUri) echo 'class = "active"';} & Gt; & lt; div class = "navbar navbar-inverse navbar-fixed-top" & gt; div class = "navbar-inside" & gt; div class = "container" & gt; & lt; ul class = "nav "& Gt; & lt; a class =" brand "class =" divider-vertical "href =" # "& gt; aerosquadron & lt; / A & gt; & Lt; Li & lt ;? = Echo Active Class If Requests Mattas ("Index")? & Gt; & Gt; & Lt; A href = "Index HP"> gt; Home & lt; / a & gt; & lt; / li & gt; & lt; li & lt;? = EchoActiveClassIfRequestMatches ("Robots_page") & gt; Gt; & lt; a href = "robots_page.php" & gt; "& gt; Robots & lt; / A & gt; & Lt; / Li & gt; & Lt; Li & lt ;? = EchoActiveClassIfRequestMatches ("sponsor_page")? & Gt; & Gt; & Lt; A href = "sponsor_page.php" & gt; "& Gt; Our sponsors  & Lt; / Div & gt; & Lt; / Div & gt;    

Last HTML Part:

     

No comments:

Post a Comment