0
此php文件顯示正確,但正在返回'文件意外結束'錯誤。該錯誤是否在html文件中。我試圖把內部打印標籤放在「」中,刪除了一行額外的空白空間,在可變行上的括號[]和引號''之間添加了空格,並且在按Enter鍵時仍然有相同的錯誤將數據發送到php腳本。下面是HTML代碼:http://pastebin.com/Rb62pZcy反饋表格HTML意外的文件結束PHP
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Your Feedback</title>
</head>
<body>
<?php // Script 3.3 handle_form.php
// This page receives the data from feedback.html
// It will receive: title, name, email, comments in $_POST
$title = $_POST [ 'title' ] ;
$name = $_POST [ 'name' ] ;
$email = $_POST [ 'email' ] ;
$comments = $_POST [ 'comments' ] ;
print "<p>Thank you, $title $name, for your comments.</p>"
"<p>You stated that you found this example to be '$response' and added:<br />$comments</p>"
?>
</body>
謝謝。我嘗試了你的建議,並給出了同樣的錯誤。 – 2013-03-21 02:12:33