<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # PHP headers_sent() 函數 ## 定義和用法 headers_sent() 函數檢查 HTTP 標頭是否已被發送以及在哪里被發送。 如果報頭已發送,則返回 true,否則返回 false。 ### 語法 ``` headers_sent(_file_,_line_) ``` | 參數 | 描述 | | --- | --- | | _file_,_line_ | 可選。如果設置 _file_ 和 _line_ 參數,headers_sent() 會把輸出開始的 PHP 源文件名和行號存入 file 和 line 變量中。 | ## 提示和注釋 注釋:一旦報頭塊已經發送,就不能使用 [header() 函數](/php/func_http_header.asp "PHP header() 函數") 來發送其它的標頭。使用此函數至少可以避免與 HTTP 標頭有關的錯誤信息。 注釋:可選的 _file_ 和 _line_ 參數是 PHP 4.3 中新加的。 ## 例子 ### 例子 1 ``` <?php // 如果報頭未發送,則發送一個 if (!headers_sent()) { header("Location: http://www.w3school.com.cn/"); exit; } ?> <html> <body> ... ... ``` ### 例子 2 使用可選的 file 和 line 參數: ``` <?php // 傳遞 $file 和 $line,供日后使用 // 不要預先為它們賦值 if (!headers_sent($file, $line)) { header("Location: http://www.w3school.com.cn/"); exit; // Trigger an error here } else { echo "Headers sent in $file on line $line"; exit; } ?> <html> <body> ... ... ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看