+ -
当前位置:首页 → 问答吧 → POST 在firefox中无法接收到数据。

POST 在firefox中无法接收到数据。

时间:2011-05-26

来源:互联网


  1. public function insert() {
  2.   $m1 = $_POST["m1"];
  3.   $table = M("Table");
  4.   if($table->create()) {
  5.    $table->m1 = $_POST["m1"];
  6.    if(false!==$table->add()){
  7.       $this->success('数据添加成功!');
  8.    }else{
  9.       $this->error('提交失敗!');
  10.    }
  11.   }else{
  12.       $this->error($table->getError());
  13.   }
  14. }
复制代码
向各位大虾求助,
在火狐浏览器中,出现错误,无法取到$_POST数据,在IE中没问题。firebug中显示post里有数据啊。
form中带有m1的页面,提交到insert之后
提示:[ 2011-05-26T09:58:53+08:00 ] NOTIC: [8] Undefined index: m1 TableAction.class.php 第 15 行
页面显示:

作者: beyond   发布时间: 2011-05-26

数据库里有m1 这个字段么

作者: xin87   发布时间: 2011-05-26

数据库里有m1字段。在IE下能正常提交。

作者: beyond   发布时间: 2011-05-26