search
HomeBackend DevelopmentPHP ProblemHow to modify the upload size configuration in php.ini

How to modify the upload size configuration in php.ini: 1. Enable HTTP upload file configuration and specify the temporary file storage location; 2. Modify the upload file size configuration and the maximum form reception value; 3. Restart the server.

How to modify the upload size configuration in php.ini

The operating environment of this article: windows10 system, php 7, thinkpad t480 computer.

Let us take a look at the specific steps to modify the upload file size configuration:

1. Open php.ini

1. file_uploads = on ;

Whether to allow file upload via HTTP switch, the default is ON;

2. upload_tmp_dir;

The file is uploaded to the place where temporary files are stored on the server. If it is not specified, it will Use the system's default temporary folder;

3.upload_max_filesize = 8m;

Wangwen business, that is, the maximum allowed file size for uploading, the default is 2M;

4 .post_max_size = 8m;

refers to the maximum value that can be received through POST to PHP through the form, including all values ​​​​in the form, the default is 8M;

Generally, set the above four After setting the parameters, uploading files of

2. Restart the php service to make the configuration take effect

service php-fpm restart
systemctl restart php-fpm

Recommended learning: php training

The above is the detailed content of How to modify the upload size configuration in php.ini. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
php.ini怎么关闭缓存php.ini怎么关闭缓存Mar 15, 2021 am 09:35 AM

php.ini关闭缓存的方法:1、找到并打开php.ini配置文件;2、找到“opcache.enable”和“opcache.enable_cli”选项,将其修改为“opcache.enable=0”和“opcache.enable_cli=0”;3、保存修改后的文件即可。

聊聊如何修改php.ini配置文件聊聊如何修改php.ini配置文件Mar 28, 2023 pm 05:34 PM

PHP.ini是一个PHP配置文件,它被用于控制PHP在服务器上的表现。此文件被用于设置一些变量的值,以便在运行时控制PHP。这篇文章将会向您展示如何修改PHP.ini配置文件的方式,以便控制PHP在您的服务器上的表现。

【整理总结】常见的PHP.ini提示报错及解决方法【整理总结】常见的PHP.ini提示报错及解决方法Mar 20, 2023 pm 04:56 PM

PHP是一种常用的服务器端脚本语言,广泛应用于Web开发领域。然而,在PHP开发过程中,我们经常会遇到各种问题。其中,PHP.ini提示报错是一个常见的问题。

php.ini文件中怎么更改时区php.ini文件中怎么更改时区Mar 22, 2023 pm 03:22 PM

PHP是一种非常流行的服务器端编程语言。在使用PHP开发Web应用程序时,我们有时需要在PHP中设置时区。PHP默认的时区是“UTC(协调世界时)”,这在很多情况下都不是我们想要的时区,因此我们需要在php.ini文件中更改时区设置。本文将介绍如何在php.ini文件中更改时区。

linux php.ini不生效如何解决linux php.ini不生效如何解决May 13, 2023 am 09:10 AM

linuxphp.ini不生效的解决办法:1、重新加载php.ini配置文件;2、在打印出的“phpinfo();”中搜索要修改的配置;3、查看“php-fpm.conf”配置文件,检查是否覆盖了php.ini中的配置即可。linuxphp.ini不生效怎么办?在linux环境下修改php.ini不生效问题排查php.ini修改后不生效主要有如下几种原因:1、修改php.ini配置文件后,没有重新加载php.ini配置文件。2、存在多个php.ini配置文件3、php.ini中的配置被其他文件中

wamp中怎么修改php.ini文件wamp中怎么修改php.ini文件Mar 20, 2023 pm 03:33 PM

Wampserver是一个可以在Windows计算机上安装Apache、PHP和MySQL的软件包。使用Wampserver可以轻松地在本地计算机上开发和测试PHP网站。在开发过程中,我们可能需要修改PHP配置文件php.ini。本文将介绍如何在Wampserver中修改php.ini文件。

php7 php.ini中没有mysql.all如何解决php7 php.ini中没有mysql.all如何解决May 28, 2023 am 11:59 AM

PHP7中的迁移问题PHP7是PHP的下一个主要版本,它在性能和安全方面都有巨大的改进,因此很多网站都希望尽快升级到PHP7。然而,升级到PHP7并不总是容易的。由于与之前版本的不兼容性,企业可能需要进行一些修改,通常是在应用代码中和PHP配置文件中做一些调整。如上所述,PHP7中的mysql扩展已经被删除,因此如果你在旧版本的PHP中使用了mysql扩展,那么你需要在迁移到PHP7时进行一些修改。你可以选择将mysql扩展替换为mysqli扩展(mysqli是“MySQLImproved”扩展

php7改php.ini不起作用怎么办php7改php.ini不起作用怎么办Nov 07, 2022 am 09:54 AM

php7改php.ini不起作用的解决办法:1、检查配置文件的路径;2、对windows下的“php.ini”进行参数的修改;3、设置“post_max_size”的参数为“upload_max_filesize”的N倍;4、重启apache即可。

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)