php中修改:
; Maximum size of POST data that PHP will accept.
post_max_size =200M;
; Maximum allowed size for uploaded files.
upload_max_filesize =200M
; Maximum amount of memory a script may consume (128MB)
memory_limit = 128M
以下转载
在php.ini里面可以设置最大上传文件大小
解决方法:
第一:
在php.ini里面查看如下行:
upload_max_filesize = 8M
post_max_size = 10M
memory_limit = 20M
另外要确认上传的 <form> 里类似下面的这行
<input type="hidden" name="MAX_FILE_SIZE" value="500000">
第二:
#
# 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.
#
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 524288
</Files>
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
本文介绍如何通过修改php.ini文件中的post_max_size、upload_max_filesize和memory_limit等参数来增加PHP应用程序中文件上传的最大尺寸。同时,文章还提供了确保上传表单正确配置的建议。
1万+

被折叠的 条评论
为什么被折叠?



