第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

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

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.



這是我封裝的xml格式數(shù)據(jù), ?寫的跟老師的一樣, ?一旦調(diào)用測試就報(bào)這個(gè)錯(cuò)誤, ?糾結(jié)中, ?求助

源代碼如下:


public static function xmlEncode($code,$message="",$data)

{

if(!is_numeric($code))

{

return "";

}

$result=array(

'code'=>$code,

'message'=>$messgae,

'data'=>$data

);

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

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

$xml .= "<root>";

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

$xml .= "</root>";

echo $xml;

}

public static function xmlToEncode($data)

{

$xml = "";

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

$addr = "";

if(is_numeric($key)){

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

$key = 'item';

}

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

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

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

}

return $xml;

}



正在回答

舉報(bào)

0/150
提交
取消
PHP開發(fā)APP接口
  • 參與學(xué)習(xí)       79152    人
  • 解答問題       608    個(gè)

APP通信接口技術(shù),不得不掌握的法寶,學(xué)完之后你會受益良多

進(jìn)入課程

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

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號