Welcome to WebmasterWorld Guest from 54.162.226.212

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

How to display NONE for icon Homepage?

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

WebmasterWorld Senior Member 5+ Year Member



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?
3:43 pm on Sep 7, 2012 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



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.
4:56 pm on Sep 7, 2012 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member



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?
 

Featured Threads

Hot Threads This Week

Hot Threads This Month