• <legend id='nKX05'><style id='nKX05'><dir id='nKX05'><q id='nKX05'></q></dir></style></legend>

      <bdo id='nKX05'></bdo><ul id='nKX05'></ul>

      <tfoot id='nKX05'></tfoot>

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

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

        是 header('Content-Type:text/plain');有必要吗?

        Is header(#39;Content-Type:text/plain#39;); necessary at all?(是 header(Content-Type:text/plain);有必要吗?)
          <bdo id='Y3Mms'></bdo><ul id='Y3Mms'></ul>
            <tbody id='Y3Mms'></tbody>
          1. <i id='Y3Mms'><tr id='Y3Mms'><dt id='Y3Mms'><q id='Y3Mms'><span id='Y3Mms'><b id='Y3Mms'><form id='Y3Mms'><ins id='Y3Mms'></ins><ul id='Y3Mms'></ul><sub id='Y3Mms'></sub></form><legend id='Y3Mms'></legend><bdo id='Y3Mms'><pre id='Y3Mms'><center id='Y3Mms'></center></pre></bdo></b><th id='Y3Mms'></th></span></q></dt></tr></i><div id='Y3Mms'><tfoot id='Y3Mms'></tfoot><dl id='Y3Mms'><fieldset id='Y3Mms'></fieldset></dl></div>
            <legend id='Y3Mms'><style id='Y3Mms'><dir id='Y3Mms'><q id='Y3Mms'></q></dir></style></legend>
              • <small id='Y3Mms'></small><noframes id='Y3Mms'>

                  <tfoot id='Y3Mms'></tfoot>

                1. 本文介绍了是 header('Content-Type:text/plain');有必要吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我还没有看到有或没有这个头部信息的任何区别.

                  I didn't see any difference with or without this head information yet.

                  推荐答案

                  定义必要".

                  如果您希望浏览器知道文件的类型是什么,这是必要的.如果您不覆盖它,PHP 会自动将 Content-Type 标头设置为 text/html,因此您的浏览器会将其视为不包含任何 HTML 的 HTML 文件.如果您的输出包含任何 HTML,您会看到非常不同的结果.如果您要发送:

                  It is necessary if you want the browser to know what the type of the file is. PHP automatically sets the Content-Type header to text/html if you don't override it so your browser is treating it as an HTML file that doesn't contain any HTML. If your output contained any HTML you'd see very different outcomes. If you were to send:

                  <b><i>test</i></b>
                  

                  内容类型:文本/html;charset=UTF-8 将以粗体和斜体显示在浏览器文本中:

                  Content-Type: text/html; charset=UTF-8 would display in the browser text in bold and italics:

                  好的

                  Content-Type: text/plain;charset=UTF-8 会像这样在浏览器中显示:

                  whereas Content-Type: text/plain; charset=UTF-8 would display in the browser like this:

                  <b><i> OK</i></b>
                  

                  TLDR 版本: 如果你真的只输出纯文本,没有像 <> 这样的特殊字符,那么它不会真的很重要,但它错了.

                  TLDR Version: If you really are only outputing plain text with no special characters like < or > then it doesn't really matter, but it IS wrong.

                  这篇关于是 header('Content-Type:text/plain');有必要吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)
                  smtp gmail server php mailer not working(smtp gmail服务器php邮件程序不工作)
                  Email goes in spam when I send it via others SMTP server(当我通过其他 SMTP 服务器发送电子邮件时,电子邮件进入垃圾邮件)
                    <tbody id='kaEW3'></tbody>

                    <bdo id='kaEW3'></bdo><ul id='kaEW3'></ul>
                  • <legend id='kaEW3'><style id='kaEW3'><dir id='kaEW3'><q id='kaEW3'></q></dir></style></legend>

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

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

                          <tfoot id='kaEW3'></tfoot>