[英]PHP Upgrade to 5.3.8 on Network Solutions causing 404: Page not found
我在Network Solutions托管帳戶上有一個用於聯系表單的基本php腳本,該腳本過去一直工作良好,直到NS將PHP從5.2.7升級到5.3.8為止。 我收到的唯一消息是404:找不到頁面。 當我打電話給NS時,他們說這是我的劇本。 但是腳本是“未找到”。 我想念什么? 我將不勝感激任何幫助。
我沒有訪問任何錯誤日志的權限,但是這里是腳本,也許您可以看看。 非常感謝。 要注意的另一件事是,即使單擊“提交”按鈕時,OIS-MailingList.txt文件仍會寫入“ 404:未找到頁面”
<?php ob_start(); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="description" content="Orion Inspection Services provides the oil and gas industry with the most highly skilled and professional workforce available." />
<title>Orion Inspection Services | Contact Us</title>
</head>
<body>
<?php
if ((strlen($_POST['name']) < 3) || (strlen($_POST['your-phone']) < 5) || (strlen($_POST['your-email']) < 5) || (strlen($_POST['c-message']) < 5))
{
header('Location:http://orioninspection.com/Test/message-error.html');
}
else
{
$today = date('m-d-Y');
$filename = 'OIS-MailingList.txt';
$file = fopen($filename,'a+b');
echo fwrite($file,$today);
echo fwrite($file,',');
echo fwrite($file,$_POST['name']);
echo fwrite($file,',');
echo fwrite($file,$_POST['your-email']);
echo fwrite($file,',');
echo fwrite($file,$_POST['your-phone']);
echo fwrite($file,"\r\n");
header('Location:http://orioninspection.com/Test/message-success.html');
$headers = 'From: Orion Inspection Services <info@orioninspection.com>' . "\n";
$headers .= 'MIME-Version: 1.0' . "\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message .= '<b>OIS Customer Message</b><br /><br />';
$message .= '<b>Name:</b> ' . $_POST['name'] . '<br /><br />';
$message .= '<b>Email:</b> ' . $_POST['your-email'] . '<br /><br />';
$message .= '<b>Phone:</b> ' . $_POST['your-phone'] . '<br /><br />';
$message .= '<b>Message:</b> ' . $_POST['c-message'] . '<br /><br />';
$message = wordwrap($message, 70);
mail('info@orioninspection.com', 'OIS Customer Message', $message, $headers);
fclose($file);
}
?>
</body>
</html>
<?php ob_flush(); ?>
更改您的重定向標頭以指向正確的位置:
header('Location:http://orioninspection.com/message-error.html');
...
header('Location:http://orioninspection.com/message-success.html');
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.