我正在通过 PHP 发送一封电子邮件,文本在引号之前带有一个斜杠:
I'm
变成I\'m
我的PHP:
$text_message = $_POST["mymessage"];
$message="--PHP-mixed-$bound_text\r\n"
."Content-Type: text/plain; charset=\"utf-8\"\r\n"
."Content-Transfer-Encoding: 7bit\r\n\r\n"
."$text_message\r\n\r\n"
."--PHP-mixed-$bound_text\r\n"
."Content-Transfer-Encoding: base64\r\n"
."Content-Disposition: attachment; filename=\"$attachment\"\r\n"
."Content-Type: image/jpeg; name=\"$attachment\"\r\n\r\n"
.chunk_split($file)
."\r\n\r\n"
."--PHP-mixed-$bound_text--\r\n\r\n";
}
如何在不收到额外斜线的情况下发送它?谢谢。乌里