2015-06-02 13:51:21 3629次浏览 2条回答 0 悬赏 12 金钱

restful 接口开发 我用form表单 提交数据到接口方法中 代码没有错误 数据库的数据也插入正常 但是报这么个错误

以下是错误提示:

This page contains the following errors:

error on line 1 at column 1: Document is empty
Below is a rendering of the page up to the first error.
  • 回答于 2015-06-02 13:57 举报

    你这个返回的数据是JSON还是什么?

    1 条回复
    回复于 2015-06-02 14:17 回复

    json 我是这么返回的 echo json_encode($result); 我用php的curl 请求接口就能正常返回json数据 这个就是请求成功之后返回的姿态和msg ------> {"status":1,"msg":"\u6ce8\u518c\u6210\u529f,\u7b49\u5f85\u540e\u53f0\u5ba1\u6838"}

  • 回答于 2015-06-02 14:31 举报

    那你看下提交方式 是application/json 还是别的(如xml)?

您需要登录后才可以回答。登录 | 立即注册
长春子
见习主管

长春子

注册时间:2013-12-23
最后登录:2015-11-02
在线时长:10小时37分
  • 粉丝8
  • 金钱318
  • 威望0
  • 积分418

热门问题