相关疑难解决方法(0)

关闭弃用的错误php 5.3

我的服务器正在运行php 5.3和我的wordpress安装将这些错误吐出来,导致我的session_start()中断.

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 647

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 662

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 669

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on line 676

Deprecated: Assigning the return value of new by reference is deprecated in /home//public_html/hub/wp-settings.php on …
Run Code Online (Sandbox Code Playgroud)

php wordpress deprecation-warning

121
推荐指数
8
解决办法
21万
查看次数

XML错误:文档末尾的额外内容

这是XML:

<?xml version="1.0" encoding="ISO-8859-1"?>
<document>
<name>Sample Document</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;wordcount3=0</url>
</document>

<document>
<name>Sample</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;</url>
</document>
Run Code Online (Sandbox Code Playgroud)

我打开它时说: This page contains the following errors: error on line 8 at column 1: Extra content at the end of the document

但只有这样:

<document>
<name>Sample</name>
<type>document</type>
<url>http://nsc-component.webs.com/Office/Editor/new-doc.html?docname=New+Document&amp;titletype=Title&amp;fontsize=9&amp;fontface=Arial&amp;spacing=1.0&amp;text=&amp;</url>
</document>
Run Code Online (Sandbox Code Playgroud)

没关系.为什么有两个这样说呢?

xml xml-parsing

21
推荐指数
2
解决办法
9万
查看次数

XML分析错误 - 文档末尾的额外内容

我试图给出获得JSON或XML响应的选项.

JSON工作正常,但是当我查看XML时,我收到错误.

http://lmsapi.com/?api_key=fba9e59d7af86b239e82581780ff987e&format=json http://lmsapi.com/?api_key=fba9e59d7af86b239e82581780ff987e&format=xml

我不确定出了什么问题.我搜索过,我唯一看到的就是确保我没有任何额外的空格,甚至在我的元素名称中都有空格,我没有.

的index.php

<?php
require_once('includes/inc.settings.php');
if(${'Response'}['format'] == 'json'){
    print_r(${'Results'});  
}elseif(${'Response'}['format'] == 'xml'){
    header('Content-type: application/xml');
    echo "<?xml version=\"1.0\"?>";
    echo ${'Results'};
}
?>
Run Code Online (Sandbox Code Playgroud)

inc.settings.php

<?php
// ****************************************
// Require other includes 
// ****************************************
    require('Excel/PHPExcel.php');
    require('inc.variables.php');
    require('inc.functions.php');
    require('inc.browser.php');
    require('class.phpmailer.php');

// ****************************************
// Initial page setup
// ****************************************

    // Set our Error Handling
    if($debug == true){
        error_reporting(E_ALL);
        ini_set('display_errors', 1);
    } else {
        error_reporting(E_ERROR);
        ini_set('display_errors', 1);
    }

    // Set our timeout limit
    set_time_limit(30);

    // Set our memory limit
    ini_set('memory_limit', '128M');

    // Start …
Run Code Online (Sandbox Code Playgroud)

php xml

13
推荐指数
1
解决办法
8万
查看次数

标签 统计

php ×2

xml ×2

deprecation-warning ×1

wordpress ×1

xml-parsing ×1