{"id":214,"date":"2006-01-15T14:55:32","date_gmt":"2006-01-15T06:55:32","guid":{"rendered":"http:\/\/192.168.50.160\/wordpress\/?p=214"},"modified":"2006-01-15T14:55:32","modified_gmt":"2006-01-15T06:55:32","slug":"%e4%bf%ae%e6%ad%a3comment%e4%ba%82%e7%a2%bc","status":"publish","type":"post","link":"https:\/\/history.dowdot.idv.tw\/?p=214","title":{"rendered":"\u4fee\u6b63Comment\u4e82\u78bc"},"content":{"rendered":"<p><a href=\"http:\/\/192.168.50.160\/wordpress\/gallery2\/view_photo.php?set_albumName=album21&id=mail_error\"><img src=\"http:\/\/192.168.50.160\/wordpress\/albums\/album21\/mail_error.jpg\" alt=\"\" \/><\/a><\/p>\n<p>\u5176\u5be6\u9019\u500b\u554f\u984c\u5b58\u5728\u5df1\u4e45\uff0c\u6bcf\u6b21\u6709\u4eba\u8ff4\u97ff\u6536\u5230mail\u901a\u77e5\u6642\u4e3b\u65e8\u7e3d\u662f\u79c0\u51fa\u4e82\u78bc\uff0c\u53ea\u662f\u5f71\u97ff\u4e0d\u5927\uff0c\u6240\u4ee5\u5c31\u6c92\u6709\u7406\u5b83\uff0c\u76f4\u5230\u4eca\u5929\u5728\"<a href=\"http:\/\/www.douzi.org\/wp\/index.php\/articles\/98\">Windix<\/a>\"\u7684\u7db2\u7ad9\u4e2d\u770b\u5230\u89e3\u6cd5\u624d\u5c07\u554f\u984c\u89e3\u6c7a\u3002\u4e0d\u904e\"<a href=\"http:\/\/www.douzi.org\/wp\/index.php\/articles\/98\">Windix<\/a>\"\u4f7f\u7528\u5916\u639b\u7684\u65b9\u5f0f\u6211\u884c\u4e0d\u901a\uff0c\u6709\u53ef\u80fd\u6211\u4e0d\u662f1.52\u7684\u7248\u672c\uff0c\u6240\u4ee5\u6211\u6539\u7528\u53e6\u4e00\u500b\u65b9\u6cd5\uff0c\u5c07\u3000wp-includes\/function.php\u4e2dfunction wp_mail($to, $subject, $message, $headers = '', $more = '') \u6574\u6bb5function mark \u8d77\u4f86<\/p>\n<blockquote><p><code><br \/>\n\/*<br \/>\nfunction wp_mail($to, $subject, $message, $headers = '', $more = '') {<br \/>\n        if( $headers == '' ) {<br \/>\n                $headers = \"MIME-Version: 1.0n\" .<br \/>\n                \"Content-Type: text\/plain; charset=\"\" . get_settings('blog_charset') . \"\"n\";<br \/>\n        }<\/p>\n<p>        return @mail($to, $subject, $message, $headers, $more);<br \/>\n}<\/p>\n<p>*\/<br \/>\n<\/code><\/p><\/blockquote>\n<p>\u518d\u5c07<br \/>\n<!--more--><br \/>\n\"<a href=\"http:\/\/www.douzi.org\/wp\/index.php\/articles\/98\">Windix<\/a>\"\u6240\u63d0\u4f9butf-mail.php\u7684\u7a0b\u5f0f\u78bc<\/p>\n<blockquote><p><code><br \/>\nfunction wp_mail($to, $subject, $message, $headers = '') {<\/p>\n<p>\tif( $headers == '' ) {<br \/>\n\t\t$headers = \"MIME-Version: 1.0n\" .<br \/>\n\t\t\t\"From: \" . get_settings('admin_email') . \"n\" .<br \/>\n\t\t\t\"Content-Type: text\/plain; charset=\"\" . get_settings('blog_charset') . \"\"n\";<br \/>\n\t}<\/p>\n<p>\t\/\/ because WP use simple \"To\" field (xxx@xxx.xxx)<br \/>\n\t\/\/ There is no need for escaping \"To\" field.<\/p>\n<p>\t\/\/ Deal with \"subject\" field<br \/>\n\t$subject = '=?UTF-8?B?'.base64_encode($subject).'?=';<\/p>\n<p>\t\/\/ Deal with \"message\" field<br \/>\n\t$message = base64_encode($message);<\/p>\n<p>\t\/\/Deal with \"headers\" field<br \/>\n\t$tmp_headers = split(\"n\",$headers);<br \/>\n\t$op_headers = array();<br \/>\n\tforeach ($tmp_headers AS  $key=>$val  ) {<br \/>\n\t\t\/\/ From<br \/>\n\t\tif (preg_match('\/^From: \"(.+)\"(.*)$\/',$val,$matches)) {<br \/>\n\t\t\t$op_headers[] = 'From: \"'. '=?UTF-8?B?' . base64_encode($matches[1])<br \/>\n\t\t\t\t\t\t\t. '?=\"' . $matches[2];<br \/>\n\t\t}<br \/>\n\t\telseif (preg_match('\/^Content-Type: \/',$val)) {<br \/>\n\t\t\t$op_headers[] = $val . \"n\" . 'Content-Transfer-Encoding: BASE64';<br \/>\n\t\t}<br \/>\n\t\telseif (preg_match('\/^Content-Transfer-Encoding: \/',$val)) {<br \/>\n\t\t    \/\/ discard original Content-Transfer-Encoding<br \/>\n\t\t}<br \/>\n\t\telse {<br \/>\n\t\t    $op_headers[] = $val;<br \/>\n\t\t}<br \/>\n\t} \/\/ end foreach<\/p>\n<p>\t$headers = join(\"n\",$op_headers);<\/p>\n<p>\treturn mail($to, $subject, $message, $headers);<br \/>\n}<br \/>\n<\/code><\/p><\/blockquote>\n<p>\u53d6\u4ee3\u820a\u6709\u7684function\uff0c\u554f\u984c\u5c45\u7136\u5c31\u89e3\u6c7a\u4e86~~\u53ea\u662f\u4e0d\u78ba\u5b9a\u662f\u5426\u6703\u5f71\u97ff\u5230wp\u65e5\u5f8c\u7684\u5347\u7d1a~~<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5176\u5be6\u9019\u500b\u554f\u984c\u5b58\u5728\u5df1\u4e45\uff0c\u6bcf\u6b21\u6709\u4eba\u8ff4\u97ff\u6536\u5230mail\u901a\u77e5\u6642\u4e3b\u65e8\u7e3d\u662f\u79c0\u51fa\u4e82\u78bc\uff0c\u53ea\u662f\u5f71\u97ff\u4e0d\u5927\uff0c\u6240\u4ee5\u5c31\u6c92\u6709\u7406\u5b83\uff0c\u76f4\u5230\u4eca\u5929\u5728&#8221;Windix&#8221;\u7684\u7db2\u7ad9\u4e2d\u770b\u5230\u89e3\u6cd5\u624d\u5c07\u554f\u984c\u89e3\u6c7a\u3002\u4e0d\u904e&#8221;Windix&#8221;\u4f7f\u7528\u5916\u639b\u7684\u65b9\u5f0f\u6211\u884c\u4e0d\u901a\uff0c\u6709\u53ef\u80fd\u6211\u4e0d\u662f1.52\u7684\u7248\u672c\uff0c\u6240\u4ee5\u6211\u6539\u7528\u53e6\u4e00\u500b\u65b9\u6cd5\uff0c\u5c07\u3000wp-includes\/function.ph&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"ngg_post_thumbnail":0,"spay_email":""},"categories":[10],"tags":[],"jetpack_featured_media_url":"","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5NCTI-3s","_links":{"self":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/214"}],"collection":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=214"}],"version-history":[{"count":0,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/214\/revisions"}],"wp:attachment":[{"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/history.dowdot.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}