开发者

Check that no variables have been 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜