检查$ _GET [" menu"]是否为空。 [英] Check if $_GET["menu"] is null.

查看:61
本文介绍了检查$ _GET [" menu"]是否为空。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨组。

我正在使用此代码查看变量menu是否有任何参数:


if($ _GET [" menu"] ==" downloads")

....


但如果没有传递参数,此代码会记录错误(这是第一次加载页面时发生在

上。


我尝试了这段代码:


if ($ _GET [" menu"]!=""){

if($ _ GET [" menu"] ==" downloads")

...


但是这个日志在第二行记录了相同的错误。

任何帮助都应该非常感谢。

谢谢提前,


Nuno Paquete

解决方案

_GET [" menu"] ==" downloads" ;)

....


但如果没有传递参数,这段代码会记录错误(这发生在

第一次加载页面。


我尝试了这段代码:


if(


_GET [" menu"]!=""){

if(

_GET [" menu"] ==" downloads")

...


但这个日志是一样的错误的第二行。

任何帮助都将非常感激。

提前致谢,


Nuno Paquete

Hi group.
I''m using this code to see if is there any parameter for variable "menu":

if($_GET["menu"] == "downloads")
....

But this code log errors if there is no parameter passed (this heappens at
the first time the page is loaded).

I tryed this code:

if($_GET["menu"] != ""){
if($_GET["menu"] == "downloads")
...

But this log the same error on the second line.
Any help hould be greattly appreciated.
Thanks in advance,

Nuno Paquete

解决方案

_GET["menu"] == "downloads")
....

But this code log errors if there is no parameter passed (this heappens at
the first time the page is loaded).

I tryed this code:

if(


_GET["menu"] != ""){
if(


_GET["menu"] == "downloads")
...

But this log the same error on the second line.
Any help hould be greattly appreciated.
Thanks in advance,

Nuno Paquete


这篇关于检查$ _GET [" menu"]是否为空。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆