Home >Backend Development >PHP Tutorial >The server returns: error on line 19 at column 1: Extra content at the end of the document

The server returns: error on line 19 at column 1: Extra content at the end of the document

WBOY
WBOYOriginal
2016-08-08 09:25:023304browse

When interacting with the server during PHP APP interface development, the following error occurs when returning data.

If the data is returned in JSON mode, the Firefox browser displays the returned data as shown in the figure:

The returned data is displayed in the XML mode, and the Firefox browser displays the returned data as shown in the figure:

The data returned in JSON and XML mode , the Cheetah browser displays as shown:


The reasons may include the following points:

(1) In this case, the server processed the return, but there is a problem with the returned format.

                                                        Check whether the format of the returned data is the required format, such as JSON format, header("Content-Type:text/json");

(2) During the normal return process, if there is output, return The result is wrong.

                                                                                                                                                                                                                                                               The above introduces the error returned by the server: error on line 19 at column 1: Extra content at the end of the document, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:php builder patternNext article:php builder pattern