i'm running code on what i only want to be the HOME page, but the current site it built using GET variables with index.php
needless to say, the home page is accessed either as domain.com/ or domain.com/index.php - i'm hoping someone can show me how to check for this condition, that it is only index.php without anything further
I'm only slightly familiar with $_SERVER['uri'], etc... So i don't know just what to ask.
thanks for anyone's help.
Glenn
detecting "index.php" versus "index.php?var=xxx"
Moderator: General Moderators
Re: detecting "index.php" versus "index.php?var=xxx"
Code: Select all
if(!count($_GET))
{
echo 'no variables';
}
Re: detecting "index.php" versus "index.php?var=xxx"
awesome, worked. thanks much
Re: detecting "index.php" versus "index.php?var=xxx"
Code: Select all
if (empty($_SERVER['QUERY_STRING'])) {
echo 'index.php accessed';
} else {
echo 'index.php?<something> accessed';
}