无法接收post的数据,但get传递可以
本帖最后由 begin_game 于 2013-11-17 09:03 编辑有一表单,通过jquery提交
$attributes = array('name' => 'frm_reg', 'id' => 'frm_reg');
echo form_open(base_url('login/reg'), $attributes);
$('#frm_reg').submit();
后台action中,如果将前面的表单改为 'method'=>'get',可以接收到form中所有input的数据
但如果依着以上用post提交,则post数据为空,拿不到任何数据。
在FF和chrome的debug中,可以看到post数据中是有input的值的,但很奇怪的是,post地址的状态为404。
[*]Request URL:
http://localhost:7999/login/reg
[*]Request Method:
POST
[*]Status Code:
404 Not Found
此action正常访问是可以的,copy到地址栏可访问到
请各位比较熟悉CI路由模式的朋友帮忙推测下,post数据debug能看到,但拿不到,状态为404;get状态正常,也那得到数据,这一般是哪方面原因造成的呢?
我也遇到这个问题了 1. form 加上form_close();
页:
[1]