Why doesn't this simple code?

Good afternoon. You want to make download files in one form on the site, began to do and faced with a problem.

There is such code:

<?php

if(!empty($_FILES['file']['tmp_name'])) {
 echo "ok!";
}

?>

<form enctype="multipart/form-data" action="file.php" method="POST">
 Send file: <input name="file" type="file">
 <input type="submit" value="Send!">
</form>


Everything works when uploading .txt files or any other format, but when uploading a docx or doc - get error response from the server (see screenshot).

1.png

And, accordingly, the browser shows a page saying cannot load. But when I try to load other formats everything works fine.

What's the problem? Where to dig?

PS: I Tried already to bring the code into a workable download files in a specific folder, in the end, all file formats when you download go to the desired folder, namely doc or docx is not loaded.
June 27th 19 at 15:23
5 answers
June 27th 19 at 15:25
To watch allowed to download the file types on your hosting/cms
Where it is possible to look? As far as I know in php.these ini settings yet. - Fiona.Daniel74 commented on June 27th 19 at 15:28
June 27th 19 at 15:27
And the upload file size permitted?
What is written in the error_log?
No, trying all empty files. Docx to doc and the output goes whatever weight is less than normal .txt. - Fiona.Daniel74 commented on June 27th 19 at 15:30
June 27th 19 at 15:29
method="GET"!?
It is mistakenly hit. Corrected on POST. And before that POST was. - Fiona.Daniel74 commented on June 27th 19 at 15:32
June 27th 19 at 15:31
Help(
see server logs. (not the toolbar). check it out .htaccess - Fiona.Daniel74 commented on June 27th 19 at 15:34
June 27th 19 at 15:33
htmlbook.ru/samhtml5/formy/zagruzka-failov

The second to last paragraph. Can you send the right path. Although the article 2011.

Have not followed the innovations, the changes to the files.

Find more questions by tags PHPWeb DevelopmentProgramming