-2
간단한 문제가 있지만 오류를 찾을 수 없습니다. 어쩌면 당신이 도울 수 있습니다. 여기 내 요청입니다 :Ajax 요청 게시 기능 없음
$http({
url:'api/create_plane.php',
method: "POST",
data: {
planeKey: $scope.editKey,
planeSQLID: $scope.editSQLID,
planeLMID: $scope.editLMID,
planeAFID: $scope.editAFID,
planeVersion: $scope.editVersion,
planeLot: $scope.editLot,
planeStation: $scope.editStation
},
dataType: 'json'
}).success(function(data, status, headers, config) {
console.log(data);
}, function(response) {
console.log(response);
});
이 내 PHP 파일입니다 :
$Planes = array();
$MAX_PLANES = 45;
if (empty($_POST['planeLMID'])) {
for ($i = 1;$i < $MAX_PLANES;$i++) {
if (checkSQL($i)) {
$Planes[$i] = new createPlane($i,$db);
}
}
echo json_encode($Planes);
}
else {
for ($i = 1;$i < $MAX_PLANES; $i++) {
if ($Planes[$i]['planeSQLID'] == $_POST['planeSQLID']) {
echo "HALLO";
}
}
}
그러나 나는 언제든지 "Hallo"
표시되지 않습니다. 네 도움이 필요해.
수정'$ Planes'은 __empty__ –
내가 json으로 인코딩의 에코를받을 빈 비행기에 와서 잘 전에 – Kavkus
당신은받을 귀하의'에코 json' 다른 쿼리에서 –