【发布时间】:2015-10-22 20:44:31
【问题描述】:
当我向我的 php api 发出 post 请求时,我的 swift 应用程序给出了错误:
最后的垃圾
这是我的 json 代码(仅供试用):
function getTips($params)
{
$blessure = $params[0];
switch($blessure)
{
case "hoofd":
echo '
"hoofd": [
{
"naam": "neus in de kom",
"beschrijving": "neus zit in de kom",
"categorie": "hoofd"
},
{
"naam": "oor in de kom",
"beschrijving": "oor zit in de kom",
"categorie": "hoofd"
}
]
';
break;
default:
header("HTTP/1.0 404 Not Found");
break;
}
}
我在这里做错了什么?
【问题讨论】: