V
V
Viktor Koreysha2014-02-19 08:07:13
PHP
Viktor Koreysha, 2014-02-19 08:07:13

Empty array $_FILES - where to dig?

I understand that the question seems to be quite stupid, but long googling does not lead to anything.
There is a simple form:

<form enctype="multipart/form-data" method="post" action="">
...
<input id="img" type="file" name="img">
...
<form>


Immediately I output. I get: array(0) { } At the same time, both the file itself and the rest of the form fields are sent by post - I look through the firebug. On the server: file_uploads On max_file_uploads 20 upload_max_filesize 16M upload_tmp_dir /home/username/tmp/php/uploads The picture is just one and small. The same code works locally. Where else can you look? I don't have any more ideas. It seems to be so idiotically simple.
var_dump($_FILES); exit();



Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2015-03-05
Semenov

Do not invent a bicycle, take a ready-made code from any tutorial, and use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question