homepage Welcome to WebmasterWorld Guest from 54.205.188.59
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
How to display NONE for icon Homepage?
toplisek




msg:4492292
 12:04 pm on Sep 7, 2012 (gmt 0)

I like to automatic detect Homepage and set CSS to display none but rest pages will show icon like Home. How to do it in the correct way with PHP?

 

phranque




msg:4492359
 3:43 pm on Sep 7, 2012 (gmt 0)

test if the requested url is the home page and then set the class or id attribute of that element such that the style of that class or id is display none.

toplisek




msg:4492400
 4:56 pm on Sep 7, 2012 (gmt 0)

1. Is there some php code to detect in the correct way?
as I understand <?php echo $_SERVER['DOCUMENT_ROOT']; ?> will always work from PHP 4.1.0 version. The script above depends on "register_globals" being "On" (in that case you'd better turn it Off)
Is this true?
2. How to set class or ID attribute of that element in the correct way?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved