Not loading file on a hosting?

Hello, following problem: I use jquery.fileapi to upload files on the client.
On the server use the file ctrl.php.

On the local hosting everything works fine.
Hosting only works for the client, the file is not loaded.

Identified the following:
On the local server the path to a temporary file:
//code snippet ctrl.php, lines 58-59
$filename = $files['tmp_name'];
echo $filename; //outputs: D:\OpenServer\userdata\temp\php20CD.tmp
list($mime) = explode(';', @mime_content_type($filename));


On the server:
//code snippet ctrl.php, lines 58-59
$filename = $files['tmp_name'];
echo $filename; //outputs: /tmp/phpfvyCXD
list($mime) = explode(';', @mime_content_type($filename));
echo "123"; //on the hosting it is not displayed on the local displays


After the line: $filename = $files['tmp_name']; in the file ctrl.php nothing more is done

I suspect that the answer is simple, but for a long time can't find him.
The /tmp directory is 777.

Tried to create php.ini file and specify a different directory, nothing changes.
file_uploads = On 
upoad_tmp_dir = /public_html/tmp
upload_max_filesize = 2M


Thanks in advance for the answer :)
September 18th 19 at 23:47
1 answer
September 18th 19 at 23:49
Solution
You are suppressing errors (@) and remove everything will become clearer.
If echo "123" is not displayed, then the above line generates some sort of error. You only need to read in the log what is the error message.
Thank You very much for the reply. Indeed the error is not with the temporary file (as I thought). And is associated with mime_content_type:
Fatal error: Call to undefined function mime_content_type() in public_html/ctrl.php on line 93

Though php and the same, it turned out that the hosting is no longer supported.
Was replaced by:

$info = also($filename);
list($mime) = explode(';', $info['mime']);

Can someone come in handy. - josh_Runolfsdott commented on September 18th 19 at 23:52
: https://php.net/manual/en/function.mime-content-ty... this feature is deprecated. - emie commented on September 18th 19 at 23:55

Find more questions by tags PHP