HOW TO: Show PHP and/or HTML code on select pages.
Posted: Mon Jun 23, 2008 3:12 pm
Here's an example:
I tried to make the code look pretty but it's hard to do when posting...
Best,
wolfix
Code: Select all
<!-- If someone goes to any of these pages, show the html and/or php code. -->
<?php
if ($_SERVER['REQUEST_URI'] == '/' or
$_SERVER['REQUEST_URI'] == '/index.php' or
$_SERVER['REQUEST_URI'] == '/index.php?option=com_content&view=frontpage&Itemid=1' or
$_SERVER['REQUEST_URI'] == '/home-mainmenu-1.html')
{ ?>
(Put html, css or more php code here)
(Be sure to use beginning and ending php tags for embedded php code:)
example: <?php (more php code here) ?>
<?php } ?>
Best,
wolfix