php本地上传附件成功,服务器不成功,提示未选择文件

WBOY
Release: 2016-06-23 13:58:11
Original
1008 people have browsed it

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']; 看看

错误信息是什么
echo $_FILES['file']['error']; 看看


根本没有错误提示啊,最后只会是未选择文件,小于8MB就行

错误信息是什么
echo $_FILES['file']['error']; 看看


根本没有错误提示啊,最后只会是未选择文件,小于8MB就行

可能你改错了文件
改后需重启 IIS

贴出你上传代码看看


错误信息是什么
echo $_FILES['file']['error']; 看看


根本没有错误提示啊,最后只会是未选择文件,小于8MB就行
小于8M就行?明显的超过限制了。跟程序应该没关系,不过这程序里写的提示信息有问题。
改错配置文件了吧。用phpinfo函数来查看下配置文件是哪个。



错误信息是什么
echo $_FILES['file']['error']; 看看


根本没有错误提示啊,最后只会是未选择文件,小于8MB就行
小于8M就行?明显的超过限制了。跟程序应该没关系,不过这程序里写的提示信息有问题。
改错配置文件了吧。用phpinfo函数来查看下配置文件是哪个。

哥,你是对的,phpinfo函数看出确实改错了配置文件了。结贴
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!