久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

      <i id='GmwKC'><tr id='GmwKC'><dt id='GmwKC'><q id='GmwKC'><span id='GmwKC'><b id='GmwKC'><form id='GmwKC'><ins id='GmwKC'></ins><ul id='GmwKC'></ul><sub id='GmwKC'></sub></form><legend id='GmwKC'></legend><bdo id='GmwKC'><pre id='GmwKC'><center id='GmwKC'></center></pre></bdo></b><th id='GmwKC'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GmwKC'><tfoot id='GmwKC'></tfoot><dl id='GmwKC'><fieldset id='GmwKC'></fieldset></dl></div>

      1. <small id='GmwKC'></small><noframes id='GmwKC'>

      2. <legend id='GmwKC'><style id='GmwKC'><dir id='GmwKC'><q id='GmwKC'></q></dir></style></legend>
        <tfoot id='GmwKC'></tfoot>
          <bdo id='GmwKC'></bdo><ul id='GmwKC'></ul>

        聯系表單電子郵件主題的 UTF-8 編碼

        UTF-8 encoding for subject in contact form email(聯系表單電子郵件主題的 UTF-8 編碼)
        • <small id='TO5pX'></small><noframes id='TO5pX'>

          <tfoot id='TO5pX'></tfoot>
            <bdo id='TO5pX'></bdo><ul id='TO5pX'></ul>

            <legend id='TO5pX'><style id='TO5pX'><dir id='TO5pX'><q id='TO5pX'></q></dir></style></legend>

                <tbody id='TO5pX'></tbody>

                <i id='TO5pX'><tr id='TO5pX'><dt id='TO5pX'><q id='TO5pX'><span id='TO5pX'><b id='TO5pX'><form id='TO5pX'><ins id='TO5pX'></ins><ul id='TO5pX'></ul><sub id='TO5pX'></sub></form><legend id='TO5pX'></legend><bdo id='TO5pX'><pre id='TO5pX'><center id='TO5pX'></center></pre></bdo></b><th id='TO5pX'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='TO5pX'><tfoot id='TO5pX'></tfoot><dl id='TO5pX'><fieldset id='TO5pX'></fieldset></dl></div>
                • 本文介紹了聯系表單電子郵件主題的 UTF-8 編碼的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  在這個網站上網站鏈接聯系表我需要將主題發送到電子郵件UTF-8.需要在代碼的什么地方聲明UTF-8編碼?

                  On this sites Website Link contact form I need to send the subject for email in UTF-8. Where in the code we need to do declare the UTF-8 encoding?

                  kontakt.php:

                  kontakt.php:

                  <?
                  require_once "php/sendmail.class.php";
                  $sendmail = new sendMail();
                  if ($_SERVER['REQUEST_METHOD'] == 'POST')
                  {
                  $sendmail->setParams($_POST);
                  $sendmail->parseBody();
                  $sendmail->setHeaders();
                  if ($sendmail->send())
                  {
                      header('Location: kontakt.php?success=1');
                  }
                  }
                  ?>
                  

                  sendmail.class.php:

                  sendmail.class.php:

                  class sendMail {
                  
                  var $to      = 'email'; // set contact email
                  
                  var $name    = '';
                  var $subject = '';
                  var $email   = '';
                  var $body    = '';
                  var $error   = array();
                  var $headers = array();
                  
                  function setHeaders()
                  {
                      $this->headers = "From: $this->email
                  ";
                      $this->headers.= "MIME-Version: 1.0
                  ";
                      $this->headers.= "Content-type: text/html; charset=UTF-8
                  ";
                  }
                  
                  function parseBody()
                  {
                      $message     = '<html><body>';
                      $message .= '<table rules="all" style="border-color: #666;" cellpadding="10">';
                      $message .= '<tr style="background-color: #eee;"><td><strong>Name:</strong> </td><td>' . $this->name . '</td></tr>';
                      $message .= "<tr><td><strong>E-Mail-Adresse:</strong> </td><td>" . $this->email . "</td></tr>";
                      $message .= "<tr><td><strong>Betreff:</strong> </td><td>" . $this->subject . "</td></tr>";
                      $message .= "<tr><td><strong>Text:</strong> </td><td>" . $this->body . "</td></tr>";
                      $message .= "</table>";
                      $message .= "</body></html>";
                      $this->body  = $message;
                  }
                  
                  function send()
                  {
                      if ($this->error)
                      {
                          return FALSE;
                      }
                  
                      if (mail($this->to, $this->subject, $this->body, $this->headers))
                      {
                          return TRUE;
                      }
                      else
                      {
                          $this->error[] = 'Fehler beim senden';
                          return FALSE;
                      }
                  

                  在主題中,我需要 utf 8 德語字符編碼.我們需要在代碼的什么地方聲明呢?對于消息,我發現了該怎么做,但對于主題,我沒有找到解決方案.

                  In the subject I need the utf 8 german characters encoding. Where do we need to declare it in the code? For the message I found out what to do but for the subject I found no solution.

                  推薦答案

                  我是這樣做的:

                  $head = "From: "=?ISO-8859-15?Q?".imap_8bit("??ü???ü sollte hier gehen")."?=" <info@mydomain.de>
                  ";
                  $subject = "=?ISO-8859-15?Q?".imap_8bit("??ü???ü sollte hier gehen")."?=";
                  mail($mail,$subject,$text,$head);
                  

                  這只是拉丁語 15(德語)編碼.utf-8 的工作方式相同:在此處查看有關如何在郵件標頭中使用字符編碼的詳細說明:http://ncona.com/2011/06/using-utf-8-characters-on-an-e-mail-subject/

                  that is ofc just Latin-15 (German) encoding. utf-8 works the same way: look here for a great explanation on how to use character encoding in mail headers: http://ncona.com/2011/06/using-utf-8-characters-on-an-e-mail-subject/

                  對于您的代碼,您必須在 sendmail 類中進行更改:

                  for your code you have to change this in the sendmail class:

                  if (mail($this->to, '=?utf-8?B?'.base64_encode($this->subject).'?=', $this->body, $this->headers))
                  

                  !這僅在您的 php 文件是 utf-8 編碼時才能正常工作!

                  ! this only works properly if your php file is utf-8 encoded !

                  還是很煩.然后我切換到 phpmailer.為你做一切.方式更容易.我建議你使用那個.

                  still very annoying. then i switched to phpmailer. that does everything for you. way more easy. i would suggest you use that.

                  這篇關于聯系表單電子郵件主題的 UTF-8 編碼的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  Deadlock exception code for PHP, MySQL PDOException?(PHP、MySQL PDOException 的死鎖異常代碼?)
                  PHP PDO MySQL scrollable cursor doesn#39;t work(PHP PDO MySQL 可滾動游標不起作用)
                  PHP PDO ODBC connection(PHP PDO ODBC 連接)
                  Using PDO::FETCH_CLASS with Magic Methods(使用 PDO::FETCH_CLASS 和魔術方法)
                  php pdo get only one value from mysql; value that equals to variable(php pdo 只從 mysql 獲取一個值;等于變量的值)
                  MSSQL PDO could not find driver(MSSQL PDO 找不到驅動程序)
                  <i id='lFaux'><tr id='lFaux'><dt id='lFaux'><q id='lFaux'><span id='lFaux'><b id='lFaux'><form id='lFaux'><ins id='lFaux'></ins><ul id='lFaux'></ul><sub id='lFaux'></sub></form><legend id='lFaux'></legend><bdo id='lFaux'><pre id='lFaux'><center id='lFaux'></center></pre></bdo></b><th id='lFaux'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='lFaux'><tfoot id='lFaux'></tfoot><dl id='lFaux'><fieldset id='lFaux'></fieldset></dl></div>

                      <small id='lFaux'></small><noframes id='lFaux'>

                          <tbody id='lFaux'></tbody>
                          <bdo id='lFaux'></bdo><ul id='lFaux'></ul>

                          <tfoot id='lFaux'></tfoot>

                            <legend id='lFaux'><style id='lFaux'><dir id='lFaux'><q id='lFaux'></q></dir></style></legend>

                            主站蜘蛛池模板: 亚洲欧洲综合av | 秋霞a级毛片在线看 | 在线观看中文字幕一区二区 | 午夜精品久久久久久久星辰影院 | 亚洲午夜视频 | 一级a性色生活片久久毛片 一级特黄a大片 | 日韩欧美手机在线 | 欧美激情久久久 | 成年人网站在线观看视频 | 欧美激情欧美激情在线五月 | 欧美精品一区二区三区在线播放 | 亚洲国产自产 | 欧美一区二区三区四区五区无卡码 | 成人精品久久 | 极品销魂美女一区二区 | 亚洲在线中文字幕 | 亚洲欧美日韩精品久久亚洲区 | 日韩在线一区二区三区 | 午夜电影网站 | 成人欧美一区二区三区黑人孕妇 | 国产成人免费视频网站高清观看视频 | 精品一二三 | 91文字幕巨乱亚洲香蕉 | 午夜精品一区二区三区在线视频 | 日本国产一区二区 | 国产在线精品一区二区三区 | 亚洲天堂男人的天堂 | 国产激情视频在线观看 | 日日夜夜精品免费视频 | ririsao久久精品一区 | 亚洲第一黄色网 | 91免费看片 | 国产高清视频在线 | 国产精品久久久久婷婷二区次 | 亚洲一本| 国产在线观看一区二区三区 | 欧美精品一区在线 | 激情免费视频 | 亚洲成人免费视频在线观看 | 中文字字幕一区二区三区四区五区 | 超碰在线人|