glennnall Posted September 3, 2010 Share Posted September 3, 2010 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 Quote Link to comment https://forums.phpfreaks.com/topic/212450-detecting-indexphp-versus-indexphpvarxxx/ Share on other sites More sharing options...
Adam Posted September 3, 2010 Share Posted September 3, 2010 You could just check if the QUERY_STRING server var is empty: if (empty($_SERVER['QUERY_STRING'])) { Quote Link to comment https://forums.phpfreaks.com/topic/212450-detecting-indexphp-versus-indexphpvarxxx/#findComment-1106884 Share on other sites More sharing options...
glennnall Posted September 3, 2010 Author Share Posted September 3, 2010 brilliant, worked, thanks. and yes, Ronnie indubitably Wood. no question about it. Quote Link to comment https://forums.phpfreaks.com/topic/212450-detecting-indexphp-versus-indexphpvarxxx/#findComment-1106886 Share on other sites More sharing options...
Adam Posted September 3, 2010 Share Posted September 3, 2010 Aha! waaaay! Quote Link to comment https://forums.phpfreaks.com/topic/212450-detecting-indexphp-versus-indexphpvarxxx/#findComment-1106892 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.