在PHP.ini文件中找到以下内容:;;;;;;;;;;;;;;;;;;;;;;;;; ; Paths and Directories ; ;;;;;;;;;;;;;;;;;;;;;;;;; include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2" doc_root = ; the root of the php pages, used only if nonempty user_dir = ; the directory under which php opens the script using /~username, used only if nonempty upload_max_filesize = 2097152 ; 2 Meg default limit on file uploads extension_dir = c:/php3; ./ ; directory in which the loadable extensions (modules) reside 看到 upload_max_filesize = 2097152 了吗? 这就是原因!!! 改成你想要的上限吧!
里面
有MAX 关键字.找找
一定可以得
; Paths and Directories ;
;;;;;;;;;;;;;;;;;;;;;;;;;
include_path = ; UNIX: "/path1:/path2" Windows: "\path1;\path2"
doc_root = ; the root of the php pages, used only if nonempty
user_dir = ; the directory under which php opens the script using /~username, used only if nonempty
upload_max_filesize = 2097152 ; 2 Meg default limit on file uploads
extension_dir = c:/php3; ./ ; directory in which the loadable extensions (modules) reside
看到 upload_max_filesize = 2097152 了吗? 这就是原因!!!
改成你想要的上限吧!
copy($userfile, "newfilename"); 也就是说,$userfile是文件名。那么: $userfile." - 用户上传到服务器上的文件临时存放的名称";
$userfile_name." - 在用户机器上该文件的原始名称";
$userfile_size." - 上传文件的实际字节数";
$userfile_type." - 如果用户的浏览器提供了这个信息的话, 它表示mime的类型。例如 image/gif"; 于是,你就可以在程序中做条件判断了。明白了吗?
你误解了,我已经说过了,在提交后,程序处理前出错,也就是说:
出错是在提交后,还没有执行ACTION指向的程序的时候。还没有执行
copy($userfile, "newfilename")!