You are here:  » if index.php show xxx

Support Forum



if index.php show xxx

Submitted by atman on Wed, 2008-10-29 07:14 in

hi david,

i can still remember a hack from you about showing a specific text if index.php is used but i cant seem to search for it in the forum.

this can be used to add some text on the homepage only.

what is the specific code for this?

thanks in advance.

Submitted by support on Wed, 2008-10-29 09:25

Hi,

If you don't want to edit index.php itself, you can use something like this:

<?php
switch($_SERVER["PHP_SELF"])
{
case "/index.php":
?>
.....HTML TO BE SHOWN ON index.php HERE....
<?php
break;
}
?>

Cheers,
David.

Submitted by atman on Thu, 2008-10-30 13:30

thanks! this is the best method.