Salam mən bir script yazmışam deməli belədir xanaları doldurursan ve göndər düyməsini basırsan məktubun uğurla göndərilməsi saytda problemsiz göstərir lakin gondərən zaman mənim e-mailimə gelende utf-8 də problem olur yəni ı,ö,ü,ə kimi həriflər başqa simvollara çevrilir hər cür vasitədən istifadə etmişəm lakin heçnə alınmır
Verilmiş cavablar və yazılan şərhlər (4 cavab var)
0
Salam. Təsadüfən sayt DLE-də yığılmayıb?
0
Yox qardashim hec bir cms de yigilmayib scriptin hec msql bazasida yoxdu sade scripti.
2
Göndərilən məktubun encodingini bildirməlisən headerdə.
1
<?php
2
// multiple recipients
3
$to = 'aidan@example.com' . ', '; // note the comma
4
$to .= 'wez@example.com';
5
6
// subject
7
$subject = 'Birthday Reminders for August';
8
9
// message
10
$message = '
11
<html>
12
<head>
13
<title>Birthday Reminders for August</title>
14
</head>
15
<body>
16
<p>Here are the birthdays upcoming in August!</p>
17
<table>
18
<tr>
19
<th>Person</th><th>Day</th><th>Month</th><th>Year</th>
20
</tr>
21
<tr>
22
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>
23
</tr>
24
<tr>
25
<td>Sally</td><td>17th</td><td>August</td><td>1973</td>
26
</tr>
27
</table>
28
</body>
29
</html>
30
';
31
32
// To send HTML mail, the Content-type header must be set
33
$headers = 'MIME-Version: 1.0' . "\r\n";
34
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
35
36
// Additional headers
37
$headers .= 'To: Mary <mary@example.com>, Kelly <kelly@example.com>' . "\r\n";
38
$headers .= 'From: Birthday Reminder <birthday@example.com>' . "\r\n";
39
$headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
40
$headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
41
42
// Mail it
43
mail($to, $subject, $message, $headers);
44
?>
bu nümunədə gördüyün kimi iso-8859-1 kodlaşdırmadan istifadə edilib. onu utf-8 ilə əvəz et.
0
təşəkkür edirəm qardaşım
Sual verin
Cavab verin