国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

post提交json數(shù)據(jù) PHP如何通過Post請(qǐng)求發(fā)送Json數(shù)據(jù)?

PHP如何通過Post請(qǐng)求發(fā)送Json數(shù)據(jù)?Use curl$ch=curluinit()$header[]=“content type:text/XML”//將內(nèi)容類型定義為xmlcurluseto

PHP如何通過Post請(qǐng)求發(fā)送Json數(shù)據(jù)?

Use curl$ch=curluinit()$header[]=“content type:text/XML”//將內(nèi)容類型定義為xmlcurlusetopt($ch,CURLOPTuurl,$URL)//定義表單提交地址curlusetopt($ch,CURLOPTuupost,1)//定義提交類型1:Post;0:getcurlusetopt($ch,CURLOPTuheader,1) //定義是否顯示狀態(tài)。Header 1:顯示;0:不顯示curlsetopt($ch,CURLOPTuhttp Header,$Header)//定義請(qǐng)求類型curlsetopt($ch,CURLOPTureturn transfer,0)//定義是否直接輸出返回流curlsetopt($ch,CURLOPTupostfields,$poststr)//定義提交的數(shù)據(jù),下面是XML文件$res=curlexec($ch)curlClose($ch)//Close