Home > Backend Development > PHP Tutorial > PHP判断是否有Get参数的方法_php技巧

PHP判断是否有Get参数的方法_php技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-17 08:44:44
Original
902 people have browsed it

可采用如下方式判断

复制代码 代码如下:

if(is_array($_GET)&&count($_GET)>0)//判断是否有Get参数
{
if(isset($_GET["para"]))//判断所需要的参数是否存在,isset用来检测变量是否设置,返回true or false
{
$para=$_GET["para"];//存在
}
}
Related labels:
php
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template