0
내 푸른에 복잡한 JSON 개체를 게시하도록하겠습니다 PHP 5.4 사용 AngularJS와 IIS를 실행에 // 입력이 비어 :PHP : 푸른
var request = $http({
method: "post",
url: "/php/mail.php",
data: $scope.contactForm,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
내 PHP 스크립트는이 두 가지 라인으로 구성
$data = json_decode(file_get_contents("php://input"));
print_r($data);
POST 된 데이터를 읽으려고 할 때 모든 배열 ($_POST
, $_REQUEST
및 php://input
)은 비어 있습니다. POST
데이터를 삭제하고 $_SERVER['CONTENT_TYPE']
이 반향하는 'application/x-www-form-urlencoded'
이 반환되는 리디렉션이 없습니다.
Azure가 아닌 서버에서 작동합니까? –