0

当我从 send-mail.php 向 4G 手机发送 SMS 文本消息时,百分号变为倒置的问号。它可以正常发送到 3G 手机。该消息是关于降雨概率的,例如“10% 的降雨概率”。

<?php 
   // Phone number to send to 
   $phone2send2 = '1231234567@vtext.com'; 
   $headers = "From:" . $from; 
   $strForecast = "10% chance of rain"; 
   $body = $strForecast; 
   if (mail($phone2send2, $subject, $strForecast, $headers, "-f me@me.com")) { } else { }        
?>
4

1 回答 1

0

我怀疑您的手机正试图将字符串解析为 UTF-8。在某处,编码变得混乱。尝试使用utf8_encode()方法:

$strForecast = utf8_encode("10% chance of rain"); 
于 2014-05-02T15:26:32.153 回答