开发者

Check that no variables have been passed

开发者 https://www.devze.com 2023-01-10 21:45 出处:网络
I have one file index.php, I am trying to inclu开发者_JAVA百科de splash.php when no variable is passed

I have one file index.php, I am trying to inclu开发者_JAVA百科de splash.php when no variable is passed and display.php when any variable is passed.

This is what i have so far but i want to make it universal for all variables instead of just "query".

if (!isset($_REQUEST['query']))
{
include("splash.php");
}
else {
include("display.php");
} 


if (count($_REQUEST) == 0) {
   include("splash.php"); 
} else { 
   include("display.php"); 
}  

though you're better checking $_POST or $_GET (as appropriate) rather than the looser $_REQUEST

0

精彩评论

暂无评论...
验证码 换一张
取 消