【问题标题】:What causes XML Parsing Error: no root element found error?什么导致 XML Parsing Error: no root element found 错误?
【发布时间】:2017-02-07 12:11:10
【问题描述】:

我最近开始在 Firebug 中显示以下错误:

XML 解析错误:找不到根元素位置:http://dd.example.com/1.0/sources/30 第 1 行第 1 列:30:1:1

是什么原因造成的,我该如何解决?

标题标签:

Request URL: http://dd.example.com/1.0/sources/30
Request Method: PUT
Remote address: 11.11.111.111:80
Status Code: 204 No Content
Version: HTTP/1.1

请求标头:

Host: dd.example.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://dd.example.com/
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 33
Cookie: _ga=GA1.2.1885184115.1475238275; PHPSESSID=7ggri150scu2g5et1f7gtone94
Authorization: Basic TEljaGGlcDqTdW5zaKfrZX==
Connection: keep-alive

请求正文:

name=name&value=Remote+Sock&pk=30

响应标头:

Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Content-Length: 0
Content-Type: 
Date: Sun, 05 Feb 2017 16:59:50 GMT
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Pragma: no-cache
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.

【问题讨论】:

  • PHP 在做什么?
  • @chris85 编辑数据库并返回标头以通知客户端操作状态。在服务器上,我使用 Slim 作为路由器。在客户端,我使用 xeditable 发起请求并接收响应。

标签: php xml http http-headers


【解决方案1】:

正在发送状态码 204,但正在尝试发送内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-06-03
    • 2014-08-09
    • 1970-01-01
    • 2013-02-23
    • 2016-09-25
    • 2016-03-22
    • 2014-04-26
    相关资源
    最近更新 更多