Home > php教程 > php手册 > php解决无法上传大于2M文件的问题

php解决无法上传大于2M文件的问题

WBOY
Release: 2016-06-21 08:57:24
Original
1355 people have browsed it

要改php.ini,基本是改这几项:
max_execution_time = 30
max_input_time = 60
memory_limit = 8M
upload_max_filesize=8m

php.conf发现内容如下:
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#

LoadModule php4_module modules/libphp4.so

AddType application/x-httpd-php php .php3

#
# Cause the PHP interpreter handle files with a .php extension.
#

SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288


#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php

看到那个524288吗,换算下就是512k。把它改成52428800,reload apache。经测试,可以上传几十兆的文件,问题解决。



Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template