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

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

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

      1. <i id='fpG9m'><tr id='fpG9m'><dt id='fpG9m'><q id='fpG9m'><span id='fpG9m'><b id='fpG9m'><form id='fpG9m'><ins id='fpG9m'></ins><ul id='fpG9m'></ul><sub id='fpG9m'></sub></form><legend id='fpG9m'></legend><bdo id='fpG9m'><pre id='fpG9m'><center id='fpG9m'></center></pre></bdo></b><th id='fpG9m'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='fpG9m'><tfoot id='fpG9m'></tfoot><dl id='fpG9m'><fieldset id='fpG9m'></fieldset></dl></div>
      2. PhP 5.4 中的 PhP 上傳進度不起作用.會話變量未設置

        PhP Upload progress in PhP 5.4 is not working. Session variables not set(PhP 5.4 中的 PhP 上傳進度不起作用.會話變量未設置)

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

                <legend id='cHA6D'><style id='cHA6D'><dir id='cHA6D'><q id='cHA6D'></q></dir></style></legend>
              • <small id='cHA6D'></small><noframes id='cHA6D'>

              • <tfoot id='cHA6D'></tfoot>
                  <i id='cHA6D'><tr id='cHA6D'><dt id='cHA6D'><q id='cHA6D'><span id='cHA6D'><b id='cHA6D'><form id='cHA6D'><ins id='cHA6D'></ins><ul id='cHA6D'></ul><sub id='cHA6D'></sub></form><legend id='cHA6D'></legend><bdo id='cHA6D'><pre id='cHA6D'><center id='cHA6D'></center></pre></bdo></b><th id='cHA6D'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='cHA6D'><tfoot id='cHA6D'></tfoot><dl id='cHA6D'><fieldset id='cHA6D'></fieldset></dl></div>
                    <tbody id='cHA6D'></tbody>
                1. 本文介紹了PhP 5.4 中的 PhP 上傳進度不起作用.會話變量未設置的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我一開始就遇到了 PhP 文件上傳進度監視器的問題.

                  I have a problem with PhP File Upload progress monitor at the very start.

                  首先,這里是相關的 PhP.ini 設置(指令、本地值和主值):

                  First, here are the relevant PhP.ini settings (Directive, Local Value and Master Value):

                       session.upload_progress.cleanup    On  On
                       session.upload_progress.enabled    On  On
                       session.upload_progress.freq   1%  1%
                       session.upload_progress.min_freq   1   1
                       session.upload_progress.name   PHP_SESSION_UPLOAD_PROGRESS  PHP_SESSION_UPLOAD_PROGRESS
                       session.upload_progress.prefix upload_progress_    upload_progress_
                  

                  這是表格(簡化版):

                       <form id="fileupload" style="position:relative;" target="iframe_fileupload" action="http://www.athiyoga.org/testupload.php" method="POST" enctype="multipart/form-data">
                              <input type="hidden" name="<?echo ini_get("session.upload_progress.name");?>" value="first"/>
                               <input type="file" name="file_1">
                              <button type="submit" >Start Submit</button>
                        </form>
                  

                  我有 JQUERY Ajax 代碼,在同一個 PhP 文件中(當然,作為一個 JS 腳本),如:

                  I have JQUERY Ajax code, in the same PhP file (of course, as a JS script), as in:

                      $('#fileupload').submit(function(event){
                  
                      //UPDATED THIS PART after reading: http://stackoverflow.com/questions/19336610/delay-in-populating-session-upload-progress-data
                      //POSTING the magic variable PHP_SESSION_UPLOAD_PROGRESS during status inquiry too
                  
                         var params = {PHP_SESSION_UPLOAD_PROGRESS:"first", some_var:20 };
                         var data_params = jQuery.param( params );
                         setTimeout(function(){
                                upload_promise = $.ajax({
                                  url: 'upload_status.php', 
                                  data: data_params,
                                  dataType: 'html',
                                  type    : 'POST',
                                  cache   : false 
                               });
                               $.when(upload_promise).done(function(status_response){
                                     $('#response_status').html(status_response);
                               });
                          },5000);
                        ...
                        ...
                  

                  upload_status.php 只是回應 $_SESSION 數組.我還在 form-php 中設置了一個測試會話變量,以確保 AJAX(通過 upload_status.php)選擇該會話變量.確實如此.但不是 $_SESSION 數組中上傳狀態的標志(無變量/索引)!文件被上傳.我確保文件足夠大,以便 5000 毫秒足以報告一些中間狀態.

                  The upload_status.php simply echoes the $_SESSION array. I also set a test session variable in the form-php to make sure that the AJAX (thru upload_status.php) picks that session variable. It does. But not a sign (no variable/index) of the upload status in the $_SESSION array! The files get uploaded. I made sure that the files are big enough so that the 5000ms is sufficient to report some intermediate status.

                  我之前從未實現過 PhP 文件上傳進度條,所以我想知道我是否遺漏了什么.一旦我在上傳中獲得一個狀態點,我就可以完成其余的工作.

                  I have never implemented PhP file upload progress bar before so I wonder if I am missing something. Once I get one status-point in the upload, I will be able to do the rest.

                  謝謝

                  推薦答案

                  可能存在一些問題,我已經列出了其中的幾個.

                  There could be some issues, I have listed down few of them.

                  • 必須禁用 Web 服務器的請求緩沖才能使其正常工作,否則 PHP 可能僅在完全上傳后才能看到文件上傳.
                  • 當您的網絡服務器通過 FastCGI 運行 PHP 時,此功能不起作用.
                  • 不要忘記,必須在生成表單之前初始化會話,否則您將無法在會話中獲得任何信息.
                  • 它不適用于 PHP 5.3 或更早版本.
                  • 請注意,如果您運行該代碼并打印出 $_SESSSION[$key] 的內容,您會得到一個空數組,因為 session.upload_progress.cleanup 默認是打開的,并且它會在所有 POST 后立即清除進度信息數據已讀取.將其設置為 Off 或 0 以查看 $_SESSION[$key] 的內容.

                  這可以幫助您跟蹤進度條http://pecl.php.net/package/uploadprogress

                  This can help you to track your progress bar http://pecl.php.net/package/uploadprogress

                  我希望這能幫助您找出問題所在.

                  I hope this will help you to dig out the problem.

                  這篇關于PhP 5.4 中的 PhP 上傳進度不起作用.會話變量未設置的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  enable SOAP on PHP(在 PHP 上啟用 SOAP)
                  Get received XML from PHP SOAP Server(從 PHP SOAP 服務器獲取接收到的 XML)
                  not a valid AllXsd value(不是有效的 AllXsd 值)
                  PHP SoapClient: SoapFault exception Could not connect to host(PHP SoapClient:SoapFault 異常無法連接到主機)
                  Implementation of P_SHA1 algorithm in PHP(PHP中P_SHA1算法的實現)
                  Sending a byte array from PHP to WCF(將字節數組從 PHP 發送到 WCF)

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

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

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

                          <bdo id='yNfwK'></bdo><ul id='yNfwK'></ul>
                          <i id='yNfwK'><tr id='yNfwK'><dt id='yNfwK'><q id='yNfwK'><span id='yNfwK'><b id='yNfwK'><form id='yNfwK'><ins id='yNfwK'></ins><ul id='yNfwK'></ul><sub id='yNfwK'></sub></form><legend id='yNfwK'></legend><bdo id='yNfwK'><pre id='yNfwK'><center id='yNfwK'></center></pre></bdo></b><th id='yNfwK'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='yNfwK'><tfoot id='yNfwK'></tfoot><dl id='yNfwK'><fieldset id='yNfwK'></fieldset></dl></div>
                            主站蜘蛛池模板: 成人av一区二区三区 | 国产成人91 | 久久国产精品久久国产精品 | 国产成人精品一区二 | 91原创视频在线观看 | 成人国产精品 | 国产精品大全 | 久久国产精品99久久久久久丝袜 | 国产精品18hdxxxⅹ在线 | 仙人掌旅馆在线观看 | a级片网站| 免费毛片网站 | 久久久精品一区二区三区 | 欧美片网站免费 | 精品一区二区三区不卡 | 人人人干| 成人精品免费视频 | 九九在线精品视频 | 2018中文字幕第一页 | 日韩精品一区二区三区免费视频 | 玖玖操 | 国产精品揄拍一区二区久久国内亚洲精 | 成人在线精品视频 | 天天爽天天干 | 国产小视频在线看 | 成人欧美一区二区三区在线播放 | 在线91| 亚洲精品久 | 国产成都精品91一区二区三 | 中文字幕亚洲免费 | 玖玖国产 | www.亚洲精品| 国产综合精品一区二区三区 | 欧美日韩亚洲在线 | 亚洲天堂二区 | 美女爽到呻吟久久久久 | 国产成人精品久久 | 国产美女免费视频 | 99精品在线观看 | 久久久蜜桃 | 久久久久久久久国产 |