Jump to content

[SOLVED] check if current page is homepage


Vivid Lust

Recommended Posts

I'm using the following code, but it isnt working - it doesnt echo "homepage" when it is on the root page, e.g : www.mysite.com/  :shrug:  :'(

 

<?php
$addressFull = $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
if( $addressFull == $_SERVER["SERVER_NAME"] ){
	echo 'homepage';
}?>

 

Help anyone? Thanks  :D

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.