1
除電子郵件地址外,一切正常。當我發送電子郵件地址到服務器,只是回聲它,收到什麼。只有@符號問題,休息是好的。
角:
$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;
}
注 -已經配置應用
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(電子郵件),它是否也可以替代它。 –
看看:http://stackoverflow.com/questions/10267597/url-encode-vs-base64-encoding-usages – deChristo