php判断GET/POST参数是否存在

[code]
if(is_array($_GET)&&count($_GET)>0)//先判断是否通过get传值了
{
if(isset($_GET["m"]))//是否存在"m"的参数
{
$market = $_GET[‘m’];//存在

}
}else
{
echo "没有通过get传值";
}
[/code]

发表评论?

0 条评论。

发表评论


注意 - 你可以用以下 HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>