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 :)
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