我的託管公司現在說他們: 就是‘郵件服務器IP被列入黑名單’PHP問題 - 郵件服務器黑名單
WTF意思呢「(8)Exec的格式錯誤的一個「/ home /失敗EXEC」我該如何解決它? 拜託,我即將把我的頭髮撕掉。謝謝。
上一個問題解決: *我的託管公司禁用了幾個PHP函數。這對我來說確實沒有任何影響,但是我似乎正在獲取其中一個禁用的功能錯誤。錯誤是 「(13)權限被拒絕:'/home/exampledomain/public_html/cgi-bin/emailscript.php'的執行失敗」 我已經在我的PHP十幾次了,而且我沒有exec()功能。我唯一的功能是他們發誓的mail()工作得很好。我已經通過他們的客戶支持,他們拒絕告訴我發生了什麼事。*
我發佈我的代碼進行審查。請幫忙。謝謝。
<?php
/* Subject and Email Variables */
$emailSubject = 'Appointment Inquiry';
$webMaster = '[email protected]';
/* Gathering Data Variables */
$nameField = $_POST['name'];
$cellField = $_POST['cell'];
$emailField = $_POST['email'];
$dateField = $_POST['date'];
$timeField = $_POST['time'];
$lengthField = $_POST['length'];
$detailsField = $_POST['details'];
$otherField = $_POST['other'];
$screennameField = $_POST['screenname'];
$companyField = $_POST['company'];
$worknoField = $_POST['workno'];
$switchboardnoField = $_POST['switchboardno'];
$memoField = $_POST['memo'];
$subscribeField = $_POST['subscribe'];
$body = <<<EOD
<br><hr><br>
Name: $name <br>
Cellphone: $cell <br>
Email: $email <br>
Date: $date <br>
Time: $time <br>
Length of appointment: $length <br>
Details: $details <br>
Other: $other <br>
Screen Name: $screenname <br>
Company: $company <br>
Direct Line: $workno <br>
Switchboard: $switchboardno <br>
Memo: $memo <br>
Subscribe Me: $subscribe <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>My Hosting Company Sucks</title>
<link rel="shortcut icon" href="images/favicon.ico" />
<style type="text/css">
<!--
body {
background-color: #401857;
background-image: url(Images/bg.jpg);
background-repeat: repeat-x;
}
-->
</style>
</head>
<body ondragstart="return
false" onselectstart="return false">
<div id="wrapper">
<div id="logo"><a href="index.html"><img src="Images/logo.jpg" width="800" height="250" alt="logo" /></a></div>
<div id="navigation">
<p> </p>
<p class="link_cls"><a href="index.html"> Page1</a> | <a href="page2.html">Page2</a> | <a href="page3.html">Page3</a> | <a href="page4.html">Page4</a> | <a href="page5.html">Page5</a> | <a href="page6.html">Page6</a></p>
</div>
<div id="bodyArea">
<div id="center">
<p> </p>
<p> </p>
<p><img src="images/thankyou.jpg" alt="thanks" width="579" height="502" align="middle" /></p>
</div>
</div>
</div>
</body>
</html>
EOD;
echo "$theResults";
?>
我已經通過他們的客戶支持,他們不肯告訴我是怎麼回事< - 聽起來像是你需要找到一個更好的託管服務提供商。 – 2011-06-09 01:25:56
你可能是對的。 – Chickpea 2011-06-09 02:28:26