1
メールアドレス以外はすべて正常に動作します。私は電子メールアドレスをサーバーに投稿し、それをエコーすると、何も受信しません。 @ symbol、restの問題のみOKです。
角度:
$http({
method: 'POST',
url: 'http://______.org/_____.php',
data: {
signInSubmitBTN: '', email: '[email protected]'
}
}).success(function (data) {
alert(data); //alert empty when [email protected] but joeg.com is ok
});
PHP
if (isset($_POST['signInSubmitBTN'])) {
$email = $_POST["email"];
echo $email;
}
NOTE -すでにアンにあなたが必要とするアプリ
app.config(function ($httpProvider, $httpParamSerializerJQLikeProvider) {
$httpProvider.defaults.transformRequest.unshift($httpParamSerializerJQLikeProvider.$get());
$httpProvider.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded; charset=utf-8';
})
ありがとうございます。別の質問encodeURIComponent(電子メール)、これはまたこれのための代替かどうかです。 –
次のURLをご覧ください:http://stackoverflow.com/questions/10267597/url-encode-vs-base64-encoding-usages – deChristo