Welcome to WebmasterWorld Guest from 54.162.117.84

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)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 1006
votes: 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?
3:43 pm on Sept 7, 2012 (gmt 0)

Administrator

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

joined:Aug 10, 2004
posts:10553
votes: 12


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 Sept 7, 2012 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:Oct 25, 2006
posts: 1006
votes: 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?