为了账号安全,请及时绑定邮箱和手机立即绑定

这是什么问题?

This page contains the following errors:

error on line 2 at column 1: Extra content at the end of the document

Below is a rendering of the page up to the first error.

正在回答

6 回答

本页包含以下错误:

在1列2行错误:在文档末尾的额外内容

下面是一个渲染的页面上的第一个错误。


0 回复 有任何疑惑可以回复我~
#1

打死不信邪 提问者

非常感谢!
2015-06-17 回复 有任何疑惑可以回复我~

把你 的PHP代码发过来看看

0 回复 有任何疑惑可以回复我~

父类Car的speedUp()方法输出结果是10,加上子类speedUp方法中的50,得出的结果就是60

spd10000duivlemrmlvmjpkqpoefkubixrlypvvrjxelputrjpaeex

0 回复 有任何疑惑可以回复我~

我也遇到了类似的问题

0 回复 有任何疑惑可以回复我~

public static function xmlEncode($code,$message = '',$data = array()){

if (!is_numeric($code)) {

return '';

}

$result = array(

'code' => $code,

'message' => $message,

'data' => $data,

);

header("Content-Type:text/xml");

$xml = "<?xml version='1.0' encoding='UTF-8'?>\n";

$xml .="<root>\n";

$xml .=self::xmlToEncode($result);

$xml .="</root>";

echo $xml;

}


public static function xmlToEncode($data){

$xml ="";

foreach ($data as $key => $value) {

if (is_numeric($key)) {

$attr = "id='{$key}'";

$key = "item";

}

$xml .="<{$key}{$attr}>";

$xml .=is_array($value) ? self::xmlToEncode($value) : $value;

$xml .="</{$key}>\n";

}

return $xml;

}


}

$data = array(

'id' => '1',

'name' => 'wufei',

'type' => array(4,5,6),

'test' =>array(1,45,12=>array(155,'ttt')),

);

Response::xmlEncode(200,'数据传输成功',$data);


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
PHP开发APP接口
  • 参与学习       79204    人
  • 解答问题       599    个

APP通信接口技术,不得不掌握的法宝,学完之后你会受益良多

进入课程

这是什么问题?

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信