php当地上传附件成功,服务器不成功,提示未选择文件
程序员文章站
2022-05-14 23:26:34
...
php本地上传附件成功,服务器不成功,提示未选择文件
1.我设置了iis6的上传文件限制,ASPMaxRequestEntityAllowed 把它修改为需要的值(20480000)
2.php.ini设置如下,但还是上传不成功,大神们说说哪里错了,还是我缺少哪个东西了(备注:小于8MB是可以上传成功的)
[PHP]
max_execution_time = 600 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
post_max_size = 50M
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir ="C:/PHP/tmp"
; Maximum allowed size for uploaded files.
upload_max_filesize = 30M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 30
------解决方案--------------------
提示的错误信息能否提供看下?
------解决方案--------------------
错误信息是什么
echo $_FILES['file']['error']; 看看
------解决方案--------------------
可能你改错了文件
改后需重启 IIS
------解决方案--------------------
贴出你上传代码看看
------解决方案--------------------
小于8M就行?明显的超过限制了。跟程序应该没关系,不过这程序里写的提示信息有问题。
改错配置文件了吧。用phpinfo函数来查看下配置文件是哪个。
1.我设置了iis6的上传文件限制,ASPMaxRequestEntityAllowed 把它修改为需要的值(20480000)
2.php.ini设置如下,但还是上传不成功,大神们说说哪里错了,还是我缺少哪个东西了(备注:小于8MB是可以上传成功的)
[PHP]
max_execution_time = 600 ; Maximum execution time of each script, in seconds
max_input_time = 600 ; Maximum amount of time each script may spend parsing request data
;max_input_nesting_level = 64 ; Maximum input variable nesting level
memory_limit = 128M ; Maximum amount of memory a script may consume (128MB)
post_max_size = 50M
; Whether to allow HTTP file uploads.
file_uploads = On
; Temporary directory for HTTP uploaded files (will use system default if not
; specified).
upload_tmp_dir ="C:/PHP/tmp"
; Maximum allowed size for uploaded files.
upload_max_filesize = 30M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 30
------解决方案--------------------
提示的错误信息能否提供看下?
------解决方案--------------------
错误信息是什么
echo $_FILES['file']['error']; 看看
------解决方案--------------------
可能你改错了文件
改后需重启 IIS
------解决方案--------------------
贴出你上传代码看看
------解决方案--------------------
小于8M就行?明显的超过限制了。跟程序应该没关系,不过这程序里写的提示信息有问题。
改错配置文件了吧。用phpinfo函数来查看下配置文件是哪个。
相关文章
相关视频