在對(duì)接美團(tuán)外賣,新手,怎么獲取回掉地址中的數(shù)據(jù),并返回給美團(tuán)成功標(biāo)識(shí)?一下方法可以獲取數(shù)據(jù),那怎么返回給美團(tuán) success呢??public function cancel_mt_address(){
header("Content-type:text/html; charset=utf8");
$demo = array(
'data' => 'success'
);
$demo_json = json_encode($demo);
$postStr = file_get_contents("php://input");
if($postStr != NULL){
$ps = print_r($postStr, 1);
//$this->writeLog("門店映射回調(diào)返回?cái)?shù)據(jù)postStr:", $ps);
log::write('yangzl', log::EMERG);
log::write($ps, log::EMERG);
echo $demo_json;
}else{
echo $demo_json;
// $this->writeLog('門店映射回調(diào)返回?cái)?shù)據(jù)data:', $demo_json);
log::write('yangzl2', log::EMERG);
log::write($demo_json, log::EMERG);
}
}
在php API接口中怎么獲取返回的數(shù)據(jù),并返回獲取成功標(biāo)識(shí)
慕婉清6462132
2018-07-06 19:11:12