< ?php
$currentpage = $_SERVER['REQUEST_URI'];
if($currentpage=="/" || $currentpage=="/index.php" || $currentpage=="" ) {
echo "<%script src='XXXXX' type='text/javascript'><%/script>";
} else {
echo "";
};
?>
This will show your script on http://yourdomain.com/ , http://yourdomain.com/index.php and http://yourdomain.com . And will not show this on any other page.
The first echo ""; will be what is shown on these pages (Your script/module) and the second echo ""; will be what is shown on all the other pages (In this case nothing)
You can change ($currentpage=="/" || $currentpage=="/index.php" || $currentpage=="" ) to represent your pages.
You can change <%script src='XXXXX' type='text/javascript'><%/script> to
No comments:
Post a Comment