Здравствуйте! Подскажите пожалуйста работает ли PHP на narod.ru?
Мне просто 1 чел сказал, что там PHP вообще бесполезно грузить. Если не работает, то подскажите пожалуйста другой бесплатный хостинг!
Вот ссылка на страницу http://tsoy-eugene.narod.ru/gostevaya.html
А это код PHP сценария
CODE:
<html>
<head>
<title>Обработка результатов заполнения формы с помощью PHP</title>
</head>
<body bgcolor="#C4C4C4" marginwidth="0" marginheight="0" leftmargin="0" topmargin="0" alink="4FE8ED" >
<center><h1>HTML & Web Design Tip & Techniques</h1></center>
<hr />
<?
function exitOnError($errMsg)
{
echo "<html><head><title>PHP E-Mail Form ** Error on Send **</title></head>";
echo "<body bgcolor=\"#ADD8E6\">";
echo "<h1><center>HTML and Web Design Tips & Techniques</center></h1><hr>";
echo "<h2><center>ERROR Sending E-Mail</center></h2><hr>";
echo "Your email message cannot be sent!<br>";
echo "Please correct the information indicated by the ALERT message.";
echo "<script>alert('$errMsg');history.go(-1)</script>";
echo "</body></html>";
exit;
}
$toList = trim($toList);
$CcList = trim($CcList);
$BccList = trim($BccList);
$emailFrom = trim($emailFrom);
$emailReplyTo = trim($emailReplyTo);
$emailSubject = trim($emailSubject);
$emailMessage = trim($emailMessage);
if ($toList == "")
exitOnError("No recipient list! Enter addresses in \"To:\" field");
if ($emailSubject == "")
exitOnError("No subject! Fill in the \"Subject:\" field");
if ($emailMessage == "")
exitOnError("No message body! Enter your messsage in the \"Message:\" field");
$toList = str_replace(";", ",", $toList);
$CcList = str_replace(";", ",", $CcList);
$BccList = str_replace(";", ",", $BccList);
$emailHeaders = "";
if ($CcList !== "")
$emailHeaders .= "Cc: $CcList\r\n";
if ($BccList !== "")
$emailHeaders .= "Bcc: $BccList\r\n";
if ($emailFrom !== "")
$emailHeaders .= "From: $emailFrom\r\n";
if ($emailReplyTo !== "")
$emailHeaders .= "Reply-to: $emailReplyTo\r\n";
$emailHeaders .= "X-Sender: PHP4 - HTML & Web Design Tips & Techniques\r\n";
$emailHeaders .= "X-Whatever: Whatever you want to send in the header\r\n";
// mail($toList, $emailSubject, $emailMessage, $emailHeaders);
echo "<html><head><title>PHP E-Mail Form Confirmation</title></head>";
echo "<body bgcolor=\"#ADD8E6\">";
echo "<h1><center>HTML and Web Design Tips & Techniques</center></h1><hr>";
echo "<h2><center>Confirmation: E-Mail Sent</center></h2><hr>";
echo "Your email message has been sent!<br>";
echo "Click your mouse on the BACK button to return to the e-mail form page.";
echo "</body></html>";
?>
</body>
</html>
|