Good day to all, dear programmers. In the module joomla 3 I try to add to the feedback form a field with the addition of a file. A letter comes, and there is an attachment, but there are solid numbers and letters without an extension and 0kb. Here it is added
<?php $uploadfile = tempnam(sys_get_temp_dir(), sha1($_FILES['uploaded-file']['name'])); $filename = $_FILES['uploaded-file']['name']; if (move_uploaded_file($_FILES['uploaded-file']['tmp_name'], $uploadfile)) { $mail->addAttachment($uploadfile, $filename); } else { $msg .= 'Failed to move file to ' . $uploadfile; } $mailSender->addAttachment($uploadfile); ?> <label> <input class="uploaded-file" id="uploaded-file" type="file" name="uploaded-file"/> <span id="text_fileup">Выбрать файл</span> </label> I know something is missing, reviewed a lot, but did not understand what was needed there. Thanks for earlier, who will prompt the right decision. +100,500 in karma to you.😊✌
$mailin another$mailSender- Ivan Bolnikh