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

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

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.

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.

PHP
Alpaca楓 2015-11-19 19:43:06
class?Response{ /** ?*?@param?integer?$code?狀態(tài)碼 ?*?@param?string?$message?提示信息 ?*?@param?array?$data?數(shù)據(jù)?? ?*?返回?string(json) ?*/ public?static?function?jsonData($code,$message,$data?=?array()){ //如果狀態(tài)碼不是數(shù)字直接返回null if(!is_numeric($code)){ return?'not?a?num'; } //封裝數(shù)據(jù) $result?=?array( 'code'?=>?$code, 'message'?=>?$message, 'data'?=>?$data ); echo?json_encode($result); } /** ?*?@param?integer?$code?狀態(tài)碼 ?*?@param?string?$message?提示信息 ?*?@param?array?$data?數(shù)據(jù) ?*?返回?string(xml) ?*/ public?static?function??xmlData($code,?$message,$data?=?array()){ if(!is_numeric($code)){ return?''; } //封裝array數(shù)據(jù) $result?=?array( 'code'=>$code, 'message'=>$message, 'data'=>$data, ); //封裝xml數(shù)據(jù) 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){ $xml.="<{$key}>"; $xml.="$value"; $xml.="</{$key}>\n"; } return?$xml; } } $data?=?array( 'id'=>1, 'name'=>'mike', 'num'=>123, ); Response::xmlData(200,?"ggood",$data); ?>
查看完整描述

1 回答

?
韌還

TA貢獻(xiàn)17條經(jīng)驗 獲得超9個贊

額,第二行應(yīng)該是/*

/**就可能報錯

查看完整回答
反對 回復(fù) 2015-11-19
  • 1 回答
  • 0 關(guān)注
  • 5070 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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