php XAMPP 如何增加upload_max_filesize

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38384111/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 01:33:46  来源:igfitidea点击:

XAMPP how to increase upload_max_filesize

phpfile-uploadxampp

提问by ?amo

I have installed XAMPP on Win 10. Actually I am trying to import sql file which has 11MB via PhpMyAdmin which throws me an error - Propably too big file... Before XAMPP I had my own instlation of Apache/PHP with .htaccess in the document root which solved this problem like a charm. Its content is

我已经在 Win 10 上安装了 XAMPP。实际上我正在尝试通过 PhpMyAdmin 导入 11MB 的 sql 文件,这会给我一个错误 - 可能文件太大了......在 XAMPP 之前,我有自己的 Apache/PHP 安装,在document root 像魅力一样解决了这个问题。它的内容是

php_value upload_max_filesize 20M
php_value post_max_size 20M
php_value max_execution_time 200
php_value max_input_time 200

I have it there also for xampp, but I m not able to upload this file. Smaller files works fine. Also I change php.ini from phpinfo(). It makes me crazy... What a dark magic is behind the xampp?

我也有它用于 xampp,但我无法上传此文件。较小的文件工作正常。我也从 phpinfo() 更改了 php.ini。这让我发疯了…… xampp 背后有什么黑魔法?

回答by Kamil

The issue is you have to find right path of your php.ini. First checkout path of php.ini by simple create php file with:

问题是您必须找到 php.ini 的正确路径。php.ini 的第一个结帐路径通过简单的创建 php 文件:

phpinfo();

Then find line with php.ini file and look on path, then edit this php.ini file with values:

然后找到带有 php.ini 文件的行并查看路径,然后使用值编辑此 php.ini 文件:

max_uploaded_filesize

最大上传文件大小

When you will update it don't forget to restart xamp web server.

当您更新它时,不要忘记重新启动 xamp Web 服务器。

回答by Tonny Gidraph

I just solved my problem concerning this issue: 1) Open Xampp control panel. 2) Click on the "config" button behind apache: A drop down will appear with several options: 3) Choose the php.ini file 4) Open it using notepad and look for this line: " upload_max_filesize=2M " Change the value 2M to a value like 64M. 5) Save the file. 6) Restart Apache. You are good to go!!

我刚刚解决了有关此问题的问题:1) 打开 Xampp 控制面板。2)点击apache后面的“config”按钮:会出现一个下拉菜单,里面有几个选项: 3)选择php.ini文件 4)用记事本打开,找到这一行:“upload_max_filesize=2M” 把值改成2M到 64M 之类的值。5) 保存文件。6)重新启动Apache。你已准备好出发!!

回答by Paul Clarke

I'm using XAMPP on Win10. I've updated C:\xampp\php\phi.iniand changed 2M to 200M. WordPress now reports that the limit has increased to 8M. Has anyone else seen this issue?

我在 Win10 上使用 XAMPP。我已经更新C:\xampp\php\phi.ini并将2M更改为200M。WordPress 现在报告限制已增加到 8M。有没有其他人看到过这个问题?

Paul

保罗