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

    1. <legend id='fkfEJ'><style id='fkfEJ'><dir id='fkfEJ'><q id='fkfEJ'></q></dir></style></legend>

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

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

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

      1. PHP 會話修改緩存控制標頭?

        Cache-Control Header Modified By PHP Session?(PHP 會話修改緩存控制標頭?)
      2. <legend id='4cvjx'><style id='4cvjx'><dir id='4cvjx'><q id='4cvjx'></q></dir></style></legend>

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

            <small id='4cvjx'></small><noframes id='4cvjx'>

                  本文介紹了PHP 會話修改緩存控制標頭?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在使用 Zend_Controller_Response 對象將圖像輸出到瀏覽器.我打算對圖像應用緩存,但是某些原因導致 Cache-Control 標頭被覆蓋.

                  我的代碼如下:

                  $this->getResponse()->setHeader('Last-Modified', $modifiedTime, true)->setHeader('ETag', md5($modifiedTime), true)->setHeader('Expires', $expires, true)->setHeader('Pragma', '', true)->setHeader('緩存控制', 'max-age=3600')->setHeader('Content-Type', $mimeType, true)->setHeader('Content-Length', $size, true)->setBody($data);

                  輸出(在 Firebug 中查看)是:

                  響應頭

                  <塊引用>
                  日期
                  格林威治標準時間 2009 年 3 月 25 日星期三 10:34:40
                  服務器
                  Apache/2.2.3 (Ubuntu) mod_ssl/2.2.3 OpenSSL/0.9.8c
                  到期
                  2009 年 3 月 26 日星期四 10:34:41 GMT
                  緩存控制
                  no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=3600
                  上次修改
                  1234872514
                  Etag
                  d3ef646c640b689b??0101f3e03e08a524
                  內容長度
                  1452
                  X-UA-Compatible
                  IE=EmulateIE7
                  X-Robots-Tag
                  noindex
                  Keep-Alive
                  timeout=15, max=100
                  連接
                  Keep-Alive
                  內容類型
                  圖像/jpeg

                  請求標頭

                  <塊引用>
                  主機
                  khall.####.###.######.com
                  用戶代理
                  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0.7
                  接受
                  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                  接受語言
                  en-gb,en;q=0.5
                  接受編碼
                  gzip,deflate
                  Accept-Charset
                  ISO-8859-1,utf-8;q=0.7,*;q=0.7
                  保持活動
                  300
                  連接
                  保持連接
                  推薦人
                  http://khall.####.###.######.com/
                  Cookie
                  PHPSESSID=abf5056e1289d3010448107632a1c1bd

                  如您所見,緩存控件被修改為包括:

                  <塊引用>

                  no-store, no-cache, must-revalidate, post-check=0, pre-check=0

                  我懷疑是針對請求中發送的會話 cookie.有人知道發送我需要的標頭的方法,但仍將會話保留在請求中嗎?我的應用程序通過引導程序運行,會話使用 Zend_Session 處理.

                  任何幫助將不勝感激.

                  解決方案

                  來自 Zend_Controller 文檔,部分 10.9.響應對象

                  <塊引用>

                  setHeader($name, $value, $replace =false) 用于設置個人標題.默認情況下,它不替換相同的現有標題對象中的名稱;然而,設置$replace 為 true 將強制它執行所以.

                  您遇到的問題是您的 max-age=3600 被附加到緩存控制標頭,而不是替換它.嘗試將 $replace 參數設置為 true.

                  I'm outputting an image to the browser using a Zend_Controller_Response object. It is my intention to apply caching to the image, however something is causing the Cache-Control header to be overwritten.

                  My code is as follows:

                  $this->getResponse()
                      ->setHeader('Last-Modified', $modifiedTime, true)
                      ->setHeader('ETag', md5($modifiedTime), true)
                      ->setHeader('Expires', $expires, true)
                      ->setHeader('Pragma', '', true)
                      ->setHeader('Cache-Control', 'max-age=3600')
                      ->setHeader('Content-Type', $mimeType, true)
                      ->setHeader('Content-Length', $size, true)
                      ->setBody($data);
                  

                  The output (as viewed in Firebug) is:

                  Response Headers

                  Date
                  Wed, 25 Mar 2009 10:34:40 GMT
                  Server
                  Apache/2.2.3 (Ubuntu) mod_ssl/2.2.3 OpenSSL/0.9.8c
                  Expires
                  Thu, 26 Mar 2009 10:34:41 GMT
                  Cache-Control
                  no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=3600
                  Last-Modified
                  1234872514
                  Etag
                  d3ef646c640b689b0101f3e03e08a524
                  Content-Length
                  1452
                  X-UA-Compatible
                  IE=EmulateIE7
                  X-Robots-Tag
                  noindex
                  Keep-Alive
                  timeout=15, max=100
                  Connection
                  Keep-Alive
                  Content-Type
                  image/jpeg

                  Request Headers

                  Host
                  khall.####.###.######.com
                  User-Agent
                  Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.7) Gecko/2009030422 Ubuntu/8.04 (hardy) Firefox/3.0 .7
                  Accept
                  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
                  Accept-Language
                  en-gb,en;q=0.5
                  Accept-Encoding
                  gzip,deflate
                  Accept-Charset
                  ISO-8859-1,utf-8;q=0.7,*;q=0.7
                  Keep-Alive
                  300
                  Connection
                  keep-alive
                  Referer
                  http://khall.####.###.######.com/
                  Cookie
                  PHPSESSID=abf5056e1289d3010448107632a1c1bd

                  As you can see, the cache control is modified to include:

                  no-store, no-cache, must-revalidate, post-check=0, pre-check=0

                  My suspicion is towards the session cookie being sent in the request. Does anybody know a way to send the header that I require, yet still keep the session in the request? My application is run through a bootstrap, and sessions are handled using Zend_Session.

                  Any help would be appreciated.

                  解決方案

                  From the Zend_Controller documentation, section 10.9. The Response Object

                  setHeader($name, $value, $replace = false) is used to set an individual header. By default, it does not replace existing headers of the same name in the object; however, setting $replace to true will force it to do so.

                  The problem you are having is your max-age=3600 is being appended to the cache-control header, as opposed to replacing it. Try setting the $replace parameter to true.

                  這篇關于PHP 會話修改緩存控制標頭?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 找不到驅動程序)
                    <tbody id='PMa7H'></tbody>

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

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

                          1. 主站蜘蛛池模板: 国产成人精品一区二区三区在线 | 91pron在线 | 日韩中文字幕一区二区 | 久久久久久亚洲欧洲 | 久久久久国产精品一区三寸 | 成人av鲁丝片一区二区小说 | 超碰97干| 国产日韩一区二区 | 九九热精品视频在线观看 | aaaaaaa片毛片免费观看 | 国产第一页在线观看 | 国产乱码精品一区二区三区忘忧草 | 精品久久影院 | 成人精品一区二区三区 | av在线天堂 | 亚洲日本欧美日韩高观看 | 国产一区二区视频在线观看 | 男女视频在线免费观看 | av黄色在线| 欧美精品在欧美一区二区 | 狠狠狠 | 97精品超碰一区二区三区 | 日韩免费一区二区 | 超碰在线免费公开 | 亚洲日韩中文字幕一区 | 国产精品久久av | 成人在线精品视频 | 偷拍自拍网址 | 精品国产欧美一区二区三区成人 | 9191av| av中文字幕在线观看 | 日本成人久久 | 欧洲性生活视频 | 国产小视频在线 | 亚洲一区中文字幕 | 亚洲欧美综合精品久久成人 | 97久久久久久 | www.日本在线播放 | 黄网站在线播放 | 精品区 | 欧美高清dvd |