我们经常接收表单POST过来的数据时报Undefined index错误,如下: $act=$_POST['action']; 用以上代码总是提示 Notice: Undefined index: act in D:\test\post.php on line 20 另外,有时还会出现 Notice: Undefined variable: Submit ...... 等一些这样的提示 出现上面这些是 PHP 的提示而非报错,PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示.…