誰能告訴我,爲什麼即時得到這個錯誤我的代碼:PHP:在獨特的網頁顯示的博客網頁
解析錯誤:語法錯誤,意外在C「}」:\ WAMP \ WWW \博客網站\顯示。上線30
線30 PHP是最後{
這一切都似乎是正確,但即時通訊失去了一些東西我猜
<<?php
if(isset($_GET['id']) && is_int($_GET['id'])) {
$blogId = (int)$_GET['id'];
$query = "SELECT blog_id, title, date, body FROM content WHERE blog_id='$blogId'";
// run query and get record data and output it
} else {
//code to return all records as list
$dbinfo = "SELECT blog_id, title, date, body FROM content ORDER BY blog_id DESC LIMIT 0, 3";
$result = mysql_query($dbinfo) or die(mysql_error());
$return = '<p><a href="index.php"> Go Back To Content Page</a></p>';
if(mysql_num_rows($result) !=0):
while($row = mysql_fetch_assoc($result)){
echo '<div id="roundedbox"><h2><a href="index.php?id=' . $row['blog_id'].$row['title'] . ' </a></h2>';
echo '<div id="date"><h5><p>' . $row['date'] . '</p></h5></div>';
echo substr('<p>' . $row['body'] . '</p>',0, 90)." .... "." read more</div>";
}
else:
echo '<p> UH OOH! THERE IS NO SUCH PAGE IT DOES\'T EXIST </p>';
echo $return;
}
?>
我給你爲了不下去一個點你的問題在你的個人資料上,但是你必須注意你的代碼寫作,因爲它是混亂的,可能使用python一小段時間(1天),你可以寫更多的訂購者代碼,而不會有這種問題 – Carlos