{"id":1958,"date":"2021-03-11T23:17:00","date_gmt":"2021-03-11T14:17:00","guid":{"rendered":"https:\/\/www.dogrow.net\/php\/?p=1958"},"modified":"2025-04-13T18:02:37","modified_gmt":"2025-04-13T09:02:37","slug":"blog70","status":"publish","type":"post","link":"https:\/\/www.dogrow.net\/php\/blog70\/","title":{"rendered":"(70) PHP8.0\u3067\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u304c\uff1f"},"content":{"rendered":"<h1 class=\"my_h\">1. \u554f\u984c\u767a\u751f<\/h1>\n<p><span class=\"my_fc_deeppinkBBig\">PHP7.4<\/span> \u304b\u3089 <span class=\"my_fc_deeppinkBBig\">PHP8.0<\/span> \u306b\u5909\u66f4\u3057\u305f\u3002<\/p>\n<p>\u3059\u308b\u3068&#8230;<br \/>\n<span class=\"my_fc_crimsonBBig\">\u30e1\u30fc\u30eb\u53d7\u4fe1\u6642\u306b\u3001\u30e1\u30fc\u30eb\u672c\u6587\u306b\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u306e\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<\/span><\/p>\n<p>\u306a\u305c\u304b\uff1f<br \/>\n\u8abf\u67fb\u4e2d&#8230;<\/p>\n<p><span class=\"my_fc_crimsonBBig\">\u5f8c\u65e5\u8ffd\u8a18<\/span><\/p>\n<h1 class=\"my_h\">\u8ffd\u8a18: 2022\/06\/12<\/h1>\n<p>\u4e0a\u8a18\u306e\u6295\u7a3f\u304b\u30891\u5e743\u304b\u6708\u304c\u7d4c\u904e\u3057\u305f\u3002<br \/>\n\u4e45\u3057\u3076\u308a\u306b PHP ver.8\u3067\u30e1\u30fc\u30eb\u9001\u4fe1\u3057\u3066\u307f\u308b\u3053\u3068\u306b\u3057\u305f\u3002<\/p>\n<p>\u7d50\u679c\u306f&#8230;<br \/>\n<span class=\"my_fc_deeppinkBBig\">\u81ea\u7136\u6cbb\u7652<\/span><\/p>\n<p>\u3053\u3093\u306a\u8a00\u3044\u65b9\u306f\u4f5c\u3063\u3066\u304f\u3060\u3055\u3063\u3066\u3044\u308b\u65b9\u3005\u306b\u5bfe\u3057\u3066\u5931\u793c\u3060\u304c&#8230;<br \/>\n\u3042\u308a\u304c\u305f\u3044\u3053\u3068\u306b\u4fee\u6b63\u3057\u3066\u304f\u3060\u3055\u3063\u305f\u3088\u3046\u3060\u3002<\/p>\n<p>\u56e0\u307f\u306b\u4eca\u56de\u8a66\u3057\u305f PHP\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f <span class=\"my_fc_blueBBig\">PHP ver.8.0.17<\/span> \u3060\u3002<\/p>\n<p>\u826f\u304b\u3063\u305f\u826f\u304b\u3063\u305f\uff01<\/p>\n<p>\u3068\u306f\u8a00\u3048\u3001\u3044\u3064\u518d\u767a\u3059\u308b\u304b\u308f\u304b\u3089\u306a\u3044\u306e\u3067\u3001\u4ee5\u4e0b\u306b\u30c6\u30b9\u30c8\u30da\u30fc\u30b8\u3092\u7f6e\u3044\u3066\u304a\u304f\u3002<br \/>\nPHP version\u304c\u66f4\u65b0\u3055\u308c\u308b\u5ea6\u306b\u3001\u3053\u3053\u304b\u3089\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3057\u3066\u8a66\u3057\u3066\u307f\u3088\u3046\u3002<br \/>\n<a href=\"https:\/\/php8.dogrow.net\/_test\/001_sendmail\/\" target=\"_blank\" rel=\"noopener\">https:\/\/php8.dogrow.net\/_test\/001_sendmail\/<\/a><\/p>\n<h3 class=\"my_h\">\u3068\u3053\u308d\u3067\u539f\u56e0\u306f\uff1f<\/h3>\n<p>\u3053\u3061\u3089\u306e\u30d6\u30ed\u30b0\u3067\u8aac\u660e\u3057\u3066\u304f\u3060\u3055\u3063\u3066\u3044\u308b\u3002<br \/>\n<a href=\"https:\/\/qiita.com\/onigiridajo\/items\/4e9c4808fdc33d98386b\" target=\"_blank\" rel=\"noopener\">PHP8.0\u306b\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u305f\u3089\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u304c\u304a\u304b\u3057\u304f\u306a\u3063\u305f\u8a71<\/a><br \/>\nPHP\u30d7\u30ed\u30b0\u30e9\u30e0\u5185\u3067\u3001\u30ea\u30bf\u30fc\u30f3\u30b3\u30fc\u30c9\u306e\u8a18\u8ff0\u304c\u5909\u308f\u3063\u305f\u3053\u3068\u304c\u539f\u56e0\u3068\u306e\u3053\u3068\u3002<br \/>\n\u6709\u7528\u306a\u60c5\u5831\u3092\u3042\u308a\u304c\u3068\u3046\u3054\u3056\u3044\u307e\u3059\u3002m(_ _)m<\/p>\n<p>\u3067\u3082\u3001PHP ver.8.0.17\u306e\u30bd\u30fc\u30b9\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u3066\u307f\u305f\u3068\u3053\u308d&#8230;<\/p>\n<pre class=\"my_pre\">\r\n$ wget https:\/\/www.php.net\/distributions\/php-8.1.7.tar.gz\r\n$ tar -zxvf php-8.1.7.tar.gz\r\n$ vi .\/php-8.1.7\/ext\/standard\/mail.c\r\n<\/pre>\n<p>\u4e0a\u8a18\u30d6\u30ed\u30b0\u306e\u6307\u6458\u500b\u6240\u306f\u5909\u66f4\u3055\u308c\u3066\u3044\u306a\u3044\u3002<br \/>\n\u3042\u308c\u3063\uff1f \u5225\u8981\u56e0\u306a\u306e\u304b\uff1f<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nfprintf(sendmail, &quot;To: %s\\r\\n&quot;, to);\r\nfprintf(sendmail, &quot;Subject: %s\\r\\n&quot;, subject);\r\nif (hdr != NULL) {\r\n    fprintf(sendmail, &quot;%s\\r\\n&quot;, hdr);\r\n}\r\nfprintf(sendmail, &quot;\\r\\n%s\\r\\n&quot;, message);\r\nret = pclose(sendmail);\r\n<\/pre>\n<h1 class=\"my_h\">\u8ffd\u8a18: 2025\/04\/13<\/h1>\n<p>\u73fe\u6642\u70b9\u3067\u306f\u3001PHPMailer \u3092\u4f7f\u3063\u3066\u30e1\u30fc\u30eb\u9001\u4fe1\u30b3\u30fc\u30c9\u3092\u66f8\u304f\u3068\u4e0a\u624b\u304f\u884c\u304f\u3002<br \/>\n\u3000\u2192 \u3068\u3044\u3046\u3053\u3068\u306f\u3001\u3084\u3063\u3071\u308a\u81ea\u4f5c\u30b3\u30fc\u30c9\u304c\u3044\u3051\u306a\u3044\u306e\u304b&#8230;<br \/>\n\u3000\u3000\u2192 ToDo: \u5f8c\u3067 PHPMailer\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u898b\u3066\u52c9\u5f37\u3057\u3088\u3046\u3002<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\nuse PHPMailer\\PHPMailer\\PHPMailer;\r\nuse PHPMailer\\PHPMailer\\Exception;\r\n\r\nrequire '\/home\/\u30e6\u30fc\u30b6\u30fc\u540d\/www\/libs\/PHPMailer\/src\/PHPMailer.php';\r\nrequire '\/home\/\u30e6\u30fc\u30b6\u30fc\u540d\/www\/libs\/PHPMailer\/src\/SMTP.php';\r\nrequire '\/home\/\u30e6\u30fc\u30b6\u30fc\u540d\/www\/libs\/PHPMailer\/src\/Exception.php';\r\n\r\n$mail = new PHPMailer(true);\r\n\r\ntry {\r\n    $mail-&gt;CharSet = 'UTF-8';     \/\/ \u65e5\u672c\u8a9e\u5bfe\u5fdc\r\n    $mail-&gt;Encoding = 'base64';   \/\/ \u5b89\u5168\u306a\u672c\u6587\u30a8\u30f3\u30b3\u30fc\u30c9\r\n    $mail-&gt;isHTML(false);         \/\/ \u30c6\u30ad\u30b9\u30c8\u30e1\u30fc\u30eb\u6307\u5b9a\r\n\r\n    \/\/ sendmail\u3092\u4f7f\u3046\r\n    \/\/ $mail-&gt;isSendmail();  \/\/ \u660e\u793a\u3057\u3066\u3082OK\u3001\u7701\u7565\u3067\u3082\u53ef\r\n\r\n    $mail-&gt;setFrom('your@domain.com', '\u3042\u306a\u305f\u306e\u540d\u524d');\r\n    $mail-&gt;addAddress('to@example.com', '\u53d7\u4fe1\u8005\u306e\u540d\u524d');\r\n    $mail-&gt;addReplyTo('reply@example.com', '\u8fd4\u4fe1\u5148\u306e\u540d\u524d');\r\n\r\n    $mail-&gt;Subject = '\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb';\r\n    $mail-&gt;Body    = &quot;\u3053\u3093\u306b\u3061\u306f\uff01\u3053\u308c\u306f\u30c6\u30b9\u30c8\u30e1\u30fc\u30eb\u3067\u3059\u3002\\n\u8fd4\u4fe1\u5148\u3082\u8a2d\u5b9a\u6e08\u307f\u3067\u3059\u3002&quot;;\r\n\r\n    $mail-&gt;send();\r\n    echo &quot;\u30e1\u30fc\u30eb\u9001\u4fe1\u6210\u529f\uff01&quot;;\r\n} catch (Exception $e) {\r\n    echo &quot;\u30e1\u30fc\u30eb\u9001\u4fe1\u5931\u6557: {$mail-&gt;ErrorInfo}&quot;;\r\n}\r\n<\/pre>\n<hr class=\"my_hr_bottom\">\n","protected":false},"excerpt":{"rendered":"<p>1. \u554f\u984c\u767a\u751f PHP7.4 \u304b\u3089 PHP8.0 \u306b\u5909\u66f4\u3057\u305f\u3002 \u3059\u308b\u3068&#8230; \u30e1\u30fc\u30eb\u53d7\u4fe1\u6642\u306b\u3001\u30e1\u30fc\u30eb\u672c\u6587\u306b\u30e1\u30fc\u30eb\u30d8\u30c3\u30c0\u306e\u5185\u5bb9\u304c\u8868\u793a\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002 \u306a\u305c\u304b\uff1f \u8abf\u67fb\u4e2d&#8230; \u5f8c\u65e5\u8ffd\u8a18 \u8ffd\u8a18: 2022\/\u2026 <span class=\"read-more\"><a href=\"https:\/\/www.dogrow.net\/php\/blog70\/\">\u7d9a\u304d\u3092\u8aad\u3080 &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,24],"tags":[],"class_list":["post-1958","post","type-post","status-publish","format-standard","hentry","category-php","category-24"],"views":2107,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":12,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"predecessor-version":[{"id":2108,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/posts\/1958\/revisions\/2108"}],"wp:attachment":[{"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dogrow.net\/php\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}