Php 从get获取的值的未定义索引

Php 从get获取的值的未定义索引,php,Php,我收到此行的未定义索引错误: $msg = $_GET['msg']; 可能重复的 if(array_key_exists('msg',$_GET)) { //Your Code }

我收到此行的未定义索引错误:

$msg = $_GET['msg'];
可能重复的
if(array_key_exists('msg',$_GET))
{
//Your Code

}