• <legend id='FMaDQ'><style id='FMaDQ'><dir id='FMaDQ'><q id='FMaDQ'></q></dir></style></legend>

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

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

        覆盖 upload_max_filesize

        overriding upload_max_filesize(覆盖 upload_max_filesize)

          • <bdo id='2owSp'></bdo><ul id='2owSp'></ul>
              <tbody id='2owSp'></tbody>
            1. <legend id='2owSp'><style id='2owSp'><dir id='2owSp'><q id='2owSp'></q></dir></style></legend>

                <i id='2owSp'><tr id='2owSp'><dt id='2owSp'><q id='2owSp'><span id='2owSp'><b id='2owSp'><form id='2owSp'><ins id='2owSp'></ins><ul id='2owSp'></ul><sub id='2owSp'></sub></form><legend id='2owSp'></legend><bdo id='2owSp'><pre id='2owSp'><center id='2owSp'></center></pre></bdo></b><th id='2owSp'></th></span></q></dt></tr></i><div id='2owSp'><tfoot id='2owSp'></tfoot><dl id='2owSp'><fieldset id='2owSp'></fieldset></dl></div>
                <tfoot id='2owSp'></tfoot>
                • <small id='2owSp'></small><noframes id='2owSp'>

                  本文介绍了覆盖 upload_max_filesize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我试图在 php 中覆盖我的 upload_max_filesize 但我仍然得到我的 php.ini 文件中的值,即 2 mb.

                  I am trying to override my upload_max_filesize in php but I still get the value which is in my php.ini file which is 2 mb.

                  ini_set('upload_max_filesize','30M');
                  ini_set('post_max_size','30M');
                  echo("<br>".ini_get('upload_max_filesize')."<br>");
                  

                  推荐答案

                  这些设置在通过 ini_set 设置时不会有任何影响.

                  Those settings are not going to have any effect when set via ini_set.

                  原因是 PHP 需要这些值之前你的脚本甚至被执行.当发生上传时,目标脚本会在上传完成后执行,因此 PHP 需要事先知道最大大小.

                  The reason is that PHP needs those values before your script is even executed. When an upload occurs, the target script is executed when the upload is complete, so PHP needs to know the maximum sizes beforehand.

                  将它们设置在 php.ini、您的虚拟主机配置或 .htaccess 文件中.典型的 .htaccess 文件如下所示:

                  Set them in php.ini, your virtual host config, or in a .htaccess file. A typical .htaccess file would look like this:

                  php_value post_max_size 30M
                  php_value upload_max_filesize 30M
                  

                  这篇关于覆盖 upload_max_filesize的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <tbody id='pb4z7'></tbody>
                    • <bdo id='pb4z7'></bdo><ul id='pb4z7'></ul>

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

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