· 8 years ago · Nov 15, 2017, 01:36 PM
1Warning: file_get_contents(): Filename cannot be empty in
2/home/host1449451/transkribator.ru/htdocs/form/post.php</b> on line 44
3
4
5
6
7
8$from = $_POST['email'];
9$name = $_POST['name'];
10$tel = $_POST['tel'];
11$age = $_POST['age'];
12$email = $_POST['email'];
13$date = $_POST['date'];
14$to = "***@yandex.ru";
15$subject = "Пупкин";
16
17$attachment = chunk_split(base64_encode(file_get_contents($_FILES['photo']
18['tmp_name'])));
19$filename = $_FILES['photo']['name'];
20$filetype = $_FILES['photo']['type'];
21
22$boundary = md5(date('r', time()));
23
24$headers = "From: " . $email . "rn";
25$headers .= "Reply-To: " . $email . "rn";
26$headers .= "MIME-Version: 1.0rn";
27$headers .= "Content-Type: multipart/mixed; boundary="_1_$boundary"";
28
29$message="
30--_1_$boundary
31Content-Type: multipart/alternative; boundary="_2_$boundary"
32
33--_2_$boundary
34Content-Type: text/plain; charset="utf-8"
35Content-Transfer-Encoding: 7bit
36
37$message
38
39--_2_$boundary--
40--_1_$boundary
41Content-Type: "$filetype"; name="$filename"
42Content-Transfer-Encoding: base64
43Content-Disposition: attachment
44
45$attachment
46--_1_$boundary--";
47
48 mail($to, $subject, $message, $headers);