S
S
Stepan2014-09-02 16:47:51
PHP
Stepan, 2014-09-02 16:47:51

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

?>

although the other form submits normally the document name is asksmet.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Skogorev, 2014-09-02
@ykppon

is there anything extra in htaccess?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question