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 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'])) { 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. 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! Link to comment https://forums.phpfreaks.com/topic/212450-detecting-indexphp-versus-indexphpvarxxx/#findComment-1106892 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.