开发者

PHP: Uploading a .ogz-File

I'm trying to upload an .ogz-file, but if I do so, on the submit-page, the $_FILES['filename']['tmp_name'] is empty, what makes me think there are some troubles moving the file...

How can thi开发者_运维知识库s happen? And what can I do now?

thx, flo

EDIT: .ogz is a map format in the game Sauerbraten (www.sauerbraten.org)


First, check if your form has enctype="multipart/form-data" set. Then with var_dump or print_r check the actual contents of the $_FILES array. Also pay attention to the error members of the array.

Added: The PHP manual has a section explaining the error codes. Note that the MAX_FILE_SIZE form member is some kind of crap and you should ignore it and not use it.

Added 2: Oh, and, naturally, the form must have method="POST" set.


Also make sure your form is enctype="multipart/form-data"

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜