1

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 this happen? And what can I do now?

thx, flo

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

Florian Müller
  • 7,448
  • 25
  • 78
  • 120

2 Answers2

2

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.

Community
  • 1
  • 1
Vilx-
  • 104,512
  • 87
  • 279
  • 422
0

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

Michael
  • 1,816
  • 7
  • 21
  • 35