Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/229.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Magento API错误:仅在开始时允许XML声明_Php_Xml_Api_Magento_Soap - Fatal编程技术网

Php Magento API错误:仅在开始时允许XML声明

Php Magento API错误:仅在开始时允许XML声明,php,xml,api,magento,soap,Php,Xml,Api,Magento,Soap,我正在尝试访问Magento的核心API。当我试图访问url时,我得到了一个错误 This page contains the following errors: error on line 1 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error. 我已经安装了xmlrpc、soap和其他据说

我正在尝试访问Magento的核心API。当我试图访问url时,我得到了一个错误

This page contains the following errors:

error on line 1 at column 6: XML declaration allowed only at the start of the document

Below is a rendering of the page up to the first error.
我已经安装了xmlrpc、soap和其他据说是必需的扩展,但仍然没有成功

我的主机中的其他magento实例显示

This XML file does not appear to have any style information associated with it. The document tree is shown below.
加上它下面的一块XML代码


据说我的XML文档上可能有空格,但我不知道应该修改什么XML文档。

在开始之前,您可能在一些php/phtml文件中有空格

带有前导空格的xml无效,并将出现与您类似的错误

查看以下链接以了解更多说明: