Changing upload_max_filesize on php

This article describes how to lớn change the maximum upload file kích cỡ for PHPhường. scripts by using the upload_max_filesize and post_max_sizephp directives.

Bạn đang xem: Changing upload_max_filesize on php


Changing the maximum upload tệp tin size

By mặc định, the maximum upload tệp tin kích thước for PHP. scripts is set to 128 megabytes. However, you may want lớn change these limits. For example, you can set a lower limit lớn prevent web1_users from uploading large files to lớn your site. To vày this, change the upload_max_filesize & post_max_size directives.

To ensure that tệp tin uploads work correctly, the post_max_size directive should be a little larger than the upload_max_filesize. For example, the following web1_settings demonstrate how khổng lồ mix a file upload limit to lớn trăng tròn megabytes:

upload_max_filekích cỡ = 20M post_max_size = 21M
To verify the current value of the upload_max_filesize directive and other directives, you can use the phpinfo() function. For more information, please see this article.
Setting the directivesThe preferred way to lớn set php directives is using the graphical tools in the control panel.

For accounts using the cPanel control panel, see this article.

Xem thêm: Failed To Load Resource: Net::Err_Connection_Refused #6395, Net::Err_Connection_Refused

For accounts using the Plesk control panel, see this article.

Many accounts also allow the use of a customphp.ini tệp tin. For instructions to create a customphp.ini tệp tin, see this article.

More Information
Grow Your Web Business

Subscribe khổng lồ receive weekly cutting edge tips, strategies, & web1_news you need khổng lồ grow your webbusiness.


Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today & get a pre-secured, pre-optimized website. Cheông chồng out our website hosting plans today.

Xem thêm: Hướng Dẫn Đưa Wordpress Từ Localhost Lên Host, Bài 8: Chuyển Website Từ Localhost Sang Hosting


Payment accepted
*
*
*

We use cookies to lớn personalize the website for you & khổng lồ analyze the use of our trang web. You consent khổng lồ this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.


Chuyên mục: Lập trình viên