zjt01 发表于 2015-5-17 19:14:46

用postman调试json,一直取不到返回值,各路大神帮帮忙

控制器:
public function getdata()
        {
                $this->load->model('test');
                if ($this->input->post('type'))
                {
                        $result=$this->test->insert_data();   //客户端传入的json数据写入数据库
                        $this->output->set_content_type('application/json')->set_output(json_encode(array("host" => "www.11make.com","status" => "ok")));                                          //服务端返回ok 到客户端
                }
                else
                {
                        echo 'wrong! no data!';       
                }
        }


post man:
调试结果:客户端传入的json数据正常插入数据库,服务端返回的json数据出现问题,post man显示无返回数据 Could not get any response。




求大神帮忙看看

ahcheqiu 发表于 2015-5-19 14:23:54

返回码是多少?200还是500?
页: [1]
查看完整版本: 用postman调试json,一直取不到返回值,各路大神帮帮忙