If home page then do some operation

<?php

// If it is home page then do some operation::

$pathSlash = explode("/",$_SERVER['PHP_SELF']); 

if(end($pathSlash)=="" || end($pathSlash)=="index.php")
{
   //It is home page
   //Do operation
}
?>

Leave a Reply

Your email address will not be published. Required fields are marked *