Answer the question
In order to leave comments, you need to log in
Why does the browser open php file as text?
according to the server settings, everything is fine, Bitrix costs and functions well, but it is when accessing the file that opens it as a text document the contents of the file
<?php
/* получатели */
$to= "test <[email protected]>" . ", " ; //обратите внимание на запятую
/* тема/subject */
$subject = "Срочная помощь";
/* сообщение */
$message = '
<html>
<head>
<title>Срочная помощь</title>
</head>
<body>
Клиент по имени: '.$_POST["name"].'<br> просит позвонить по телефону '.$_POST["phone"].'
</body>
</html>
';
/* Для отправки HTML-почты вы можете установить шапку Content-type. */
$headers= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
/* и теперь отправим из */
mail($to, $subject, $message, $headers);
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question