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

  • <tfoot id='u5IGN'></tfoot>

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

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

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

      1. 在 Zend 框架中導出 csv

        export csv in zend framework(在 Zend 框架中導出 csv)

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

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

          • <bdo id='YNH92'></bdo><ul id='YNH92'></ul>
            <tfoot id='YNH92'></tfoot>
              <tbody id='YNH92'></tbody>
                1. <legend id='YNH92'><style id='YNH92'><dir id='YNH92'><q id='YNH92'></q></dir></style></legend>
                  本文介紹了在 Zend 框架中導出 csv的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在嘗試將數據庫表導出為可從瀏覽器下載的 .csv.我的代碼是基于 zend 框架的,我幾乎可以通過以下操作實現:

                  I'm trying to export a database table as a .csv downloadable from the browser. My code is zend framework based and I'm almost there with the following action:

                  public function exportTableAction()
                  {
                      $this->_helper->layout->disableLayout();
                      $this->_helper->viewRenderer->setNoRender();
                  
                      $fileName = $this->_getParam('fileName');
                      $tableName = $this->_getParam('tableName');       
                  
                      header('Content-type: application/octet-stream');
                      header('Content-Disposition: attachment; filename="'.$fileName.'"');
                  
                      echo $this->getCsv($tableName, $fileName);
                  }
                  

                  我可以下載包含有效數據的 .csv 文件.但是,即使我禁用了布局和渲染器,我仍然會在 .csv 文件的末尾獲得頁面的頁眉、側邊欄和頁腳的輸出.有沒有辦法禁用除我的 exportTableAction 中生成的輸出之外的任何 html 輸出?或者我可以用不同的方式將標題信息和 csv 字符串發送到瀏覽器嗎?

                  I can download my .csv file containing valid data. However, even if I disabled the layout and the renderer, I still get the output of the header, sidebar, and footer of my page at the end of my .csv file. Is there a way to disable any html output other than the one generated in my exportTableAction? Or can I send the header information and the csv string to the browser in a different way?

                  順便說一句:我正在使用操作堆棧插件來幫助我呈現標題和側邊欄,如下所示:

                  BTW: I'm using the action stack plugin to help me render the header and sidebar as follows:

                  ...
                  $actionStack = $front->getPlugin('Zend_Controller_Plugin_ActionStack');
                  $actionStack->pushStack($userlogAction);
                  $actionStack->pushStack($rightcolAction);
                  

                  干杯,阿德里安

                  推薦答案

                  我們找到了問題的解決方案.我替換了以下行

                  We found a solution to the problem. I replaced the following line

                  $this->_helper->viewRenderer->setNoRender();
                  

                  $this->_helper->viewRenderer->setNeverRender();
                  

                  如果使用 setNeverRender(),則不會渲染任何視圖(也不來自插件).

                  If setNeverRender() is used, no views are rendered (from plugin neither).

                  這篇關于在 Zend 框架中導出 csv的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 找不到驅動程序)

                      • <bdo id='LnNHG'></bdo><ul id='LnNHG'></ul>

                        <tfoot id='LnNHG'></tfoot>
                            <tbody id='LnNHG'></tbody>

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

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

                            <legend id='LnNHG'><style id='LnNHG'><dir id='LnNHG'><q id='LnNHG'></q></dir></style></legend>
                            主站蜘蛛池模板: 精品成人av | 91免费在线视频 | 欧美区在线 | 亚洲国产成人精品一区二区 | 国产午夜精品一区二区三区四区 | 国精品一区 | 成人黄色网址大全 | 色网在线看 | 91av在线免费看 | 日本久久精品视频 | 电影91久久久 | 亚洲色视频 | 亚洲国产aⅴ成人精品无吗 亚洲精品久久久一区二区三区 | 欧美在线免费 | 久久国产精品久久久久久 | 亚洲国产成人av好男人在线观看 | 亚洲大片 | 色天堂影院 | 成人在线观看网址 | 国产精品免费观看 | 精品国产免费一区二区三区五区 | 欧美寡妇偷汉性猛交 | 性一爱一乱一交一视频 | 91精品国产一区二区三区香蕉 | 国产传媒在线播放 | 亚洲美女网站 | 91视频免费| 国产一区二区三区亚洲 | 久久精品久久久久久 | 日韩欧美精品在线 | 人人澡人人射 | 亚洲视频免费在线 | 综合精品久久久 | 草久在线| 中国黄色在线视频 | 精品欧美乱码久久久久久 | 91在线精品一区二区 | 色眯眯视频在线观看 | 最新高清无码专区 | 成人免费视频网站在线看 | 国产欧美一区二区在线观看 |