摘要: 我们经常接收表单POST过来的数据时报Undefined index错误,如下: $act=$_POST['action']; 用以上代码总是提示 Notice: Undefined index: act in D:\test\post.php on line 20 另外,有时还会出现 Notice: Undefined variable: Submit ...... 等一些这样的提示 出现上面这些是PHP的提示而非报错,PHP 本身不需要事先声明变量即可直接使用,但是对未声明变量会有提示。一般作为正式的网站会把提示关掉的,甚至连错误信息也被关掉。 解决方法: 1)在变量前面 阅读全文
posted @ 2012-07-13 19:09 茗迹周 阅读(575) 评论(0) 推荐(0) 编辑