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

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

<tfoot id='zrtdR'></tfoot>

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

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

      HTML 上傳 MAX_FILE_SIZE 似乎不起作用

      HTML Upload MAX_FILE_SIZE does not appear to work(HTML 上傳 MAX_FILE_SIZE 似乎不起作用)

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

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

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

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

                <legend id='Gcymk'><style id='Gcymk'><dir id='Gcymk'><q id='Gcymk'></q></dir></style></legend>
                本文介紹了HTML 上傳 MAX_FILE_SIZE 似乎不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                限時送ChatGPT賬號..

                我想知道名為 MAX_FILE_SIZE 的隱藏字段應該如何工作?

                I am wondering how is the hidden field named MAX_FILE_SIZE supposed to work?

                <form action="" method="post" enctype="multipart/form-data">
                    <!-- in byes must preceed file field -->
                    <input type="hidden" name="MAX_FILE_SIZE" value="2097152" /> 
                    <input type="file" name="upload" />
                
                    <input type="submit" name="submit" value="Submit" />
                </form>
                

                我上傳了一個 4MB 以上的文件,但我沒有收到來自客戶端的警告(我不是在談論服務器端).MAX_FILE_SIZE 應該做什么?

                I uploaded a 4MB+ file but I got no warning from client side (I am not talking about server side). What is it MAX_FILE_SIZE supposed to do?

                更新

                好的,所以 PHP 強加了一個軟"限制.但是使用它和檢查諸如 $_FILES['upload']['size'] < 之類的東西有什么區別嗎?2000 在代碼中?

                OK so its for PHP to impose a "soft" limit. But is there any difference between using it and checking something like $_FILES['upload']['size'] < 2000 in code?

                推薦答案

                MAX_FILE_SIZEKB 而不是 字節.你是對的,它以字節為單位.因此,對于 4MB 以字節為單位轉換 4MB {1024 * (1024 * 4)} 的限制,請嘗試:

                MAX_FILE_SIZE is in KB not bytes. You were right, it is in bytes. So, for a limit of 4MB convert 4MB in bytes {1024 * (1024 * 4)} try:

                <input type="hidden" name="MAX_FILE_SIZE" value="4194304" /> 
                

                正如其他人所解釋的那樣,您永遠不會收到警告.它只是在服務器端強加一個軟限制.

                As explained by others, you will never get a warning for this. It's there just to impose a soft limit on server side.

                回答您的子問題.是的,有區別,您永遠不要相信用戶輸入.如果您想始終施加限制,則必須始終檢查其大小.不要相信 MAX_FILE_SIZE 的作用,因為它可以由用戶更改.所以,是的,您應該檢查以確保它始終達到或超過您想要的尺寸.

                To answer your sub-question. Yes, there is a difference, you NEVER trust the user input. If you want to always impose a limit, you always must check its size. Don't trust what MAX_FILE_SIZE does, because it can be changed by a user. So, yes, you should check to make sure it's always up to or above the size you want it to be.

                不同之處在于,如果您將 MAX_FILE_SIZE 強加為 2MB,并且用戶嘗試上傳 4MB 的文件,一旦達到大約上傳的前 2MB,傳輸將終止,PHP 將停止接受該文件的更多數據.它將報告文件數組的錯誤.

                The difference is that if you have imposed a MAX_FILE_SIZE of 2MB and the user tries to upload a 4MB file, once they reach roughly the first 2MB of upload, the transfer will terminate and the PHP will stop accepting more data for that file. It will report the error on the files array.

                這篇關于HTML 上傳 MAX_FILE_SIZE 似乎不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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)
                <legend id='J5Yog'><style id='J5Yog'><dir id='J5Yog'><q id='J5Yog'></q></dir></style></legend>

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

                      • <small id='J5Yog'></small><noframes id='J5Yog'>

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

                          <tbody id='J5Yog'></tbody>
                          <tfoot id='J5Yog'></tfoot>
                        1. 主站蜘蛛池模板: 国产在线激情视频 | www日日日 | 亚洲中午字幕 | 91精品久久久 | 一级黄色短片 | 在线日韩不卡 | 久草中文在线 | 国产精品免费一区二区 | av黄色网 | 天天拍天天色 | 成人国产在线观看 | 免费a国产| 91麻豆精品国产91久久久更新资源速度超快 | 欧美日韩免费 | 国产福利视频网站 | 国产三级精品三级在线观看四季网 | 暖暖日本在线视频 | 国产精品亚洲精品 | 少妇久久久久 | 综合一区二区三区 | av乱码| 超碰在线播 | 精品国产一区二区三区久久久蜜月 | 一级毛片网| 婷婷二区 | 久久这里只有精品首页 | 成人av免费在线观看 | 亚洲综合一区二区三区 | 337p日本欧洲亚洲大胆精蜜臀 | 亚洲精品欧美 | 亚洲精品乱码久久久久v最新版 | 免费黄色特级片 | 午夜精品久久久 | 国产精品久久久久久久久免费桃花 | 4hu最新网址 | 中文字幕动漫成人 | 国产电影一区二区在线观看 | 精品视频在线观看 | 一区二区三区国产在线观看 | 日韩在线| 99久视频 |