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

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

  1. <tfoot id='u6BEo'></tfoot>

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

      在 PHP 上更改 upload_max_filesize

      时间:2023-12-02
      • <bdo id='xKhro'></bdo><ul id='xKhro'></ul>

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

              <tfoot id='xKhro'></tfoot>

                  <tbody id='xKhro'></tbody>

                <i id='xKhro'><tr id='xKhro'><dt id='xKhro'><q id='xKhro'><span id='xKhro'><b id='xKhro'><form id='xKhro'><ins id='xKhro'></ins><ul id='xKhro'></ul><sub id='xKhro'></sub></form><legend id='xKhro'></legend><bdo id='xKhro'><pre id='xKhro'><center id='xKhro'></center></pre></bdo></b><th id='xKhro'></th></span></q></dt></tr></i><div id='xKhro'><tfoot id='xKhro'></tfoot><dl id='xKhro'><fieldset id='xKhro'></fieldset></dl></div>
              • 本文介绍了在 PHP 上更改 upload_max_filesize的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我正在使用 PHP 5.3.0,并且遇到了一些可能是错误(在这种情况下我会报告它)或者可能是我的问题 - 所以我要求确认一下.

                I'm using PHP 5.3.0 and have encountered something that might be a bug (in which case I'll report it) or might be me - so I'm asking to make sure.

                运行此代码时:

                <?php
                ini_set('upload_max_filesize', '10M');
                echo ini_get('upload_max_filesize'), ", " , ini_get('post_max_size')
                

                我最终得到:

                2M, 8M
                

                尽管我的 php.ini 设置得更高:

                This is despite my php.ini setting these higher:

                upload_max_filesize = 10M
                post_max_size = 10M
                

                (只出现一次)

                因为在设置值以及在 php.ini 中设置值之后发生错误,所以我倾向于认为这是一个错误.谁能确认或指出我哪里出错了?

                Because the error occurs after setting the value as well as it being set in php.ini I'm inclined to think it's a bug. Can anyone confirm or point me where I'm going wrong?

                更新:看起来重启 Apache 解决了这个问题 - 我一直认为如果你更改了 php.ini,它就不需要重启.

                Update: Looks like restarting Apache fixed this - I always thought it didn't need to be restarted if you changed php.ini.

                推荐答案

                你不能使用 速记符号 在 PHP.ini 之外设置配置值.我认为当遇到错误值时,它会回落到 2MB 作为编译默认值.

                You can't use shorthand notation to set configuration values outside of PHP.ini. I assume it's falling back to 2MB as the compiled default when confronted with a bad value.

                另一方面,我不认为 upload_max_filesize 可以使用 ini_set() 设置.官方"列表声明它是 PHP_INI_PERDIR .

                On the other hand, I don't think upload_max_filesize could be set using ini_set(). The "official" list states that it is PHP_INI_PERDIR .

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

                    <bdo id='K6XkM'></bdo><ul id='K6XkM'></ul>

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

                      1. <small id='K6XkM'></small><noframes id='K6XkM'>