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
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
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?