We have described in some of the previous articles specifically
The following code is an example of a specific workaround for PHP to send garbled messages:
- < ? PHP
- #email. PHP 2009-11-04
- $ name = $_post[' name '];
- $ Mail = $_post[' mail '];
- $ content = $_post[' content '];
- $ subject = ' test-only ' ;
- $ subject = "=? UTF-8? B? " .
Base64_encode ($subject). "? =";
- $ Body = "From: $mailn name:
$namenn content: $content ";
- $headers = "Mime-version:1.0rn";
- $headers . = ' Content-type:
text/html; Charset=utf-8 ' . "RN";
- $headers . = "content-
Transfer-encoding:8bitrn ";
- If Mail (' * * * * * * @qq. com ',
$subject, $body, $header)) {
- echo ' success ';
- }else{
- echo ' fail ';
- }
- ?>
Hope that the isomorphism of this code to understand, we can avoid PHP to send messages garbled this situation appears.
http://www.bkjia.com/PHPjc/446172.html www.bkjia.com true http://www.bkjia.com/PHPjc/446172.html techarticle we have in the previous articles specifically described in the following code is the PHP sent message garbled specific solution example:? PHP #email. php2009-11-04 $ name =$_post[' name '];