我正在嘗試編寫一個簡單的流,從mysql字段中流式傳輸所有內容。但是我現在的腳本完全沒有顯示。沒有錯誤,沒有任何東西那就是:從數據庫中獲取並顯示錯誤
include("user_sytem_scripts/connect.php");
$sql_updates = mysql_query("SELECT item_id, username, item_content, update_time FROM updates ORDER BY update_time DESC LIMIT 30") or die("Query failed with error: ".mysql_error());
while($row = mysql_fetch_array($sql_updates)){
$update_id = $row["item_id"];
$update_username = $row["username"];
$item_content = $row["item_content"];
$update_time = $row["update_time"];
$updatestream = '
<table style="background-color:#FFF; border:#999 1px solid; border-top:none;" cellpadding="5" width="100%">
<tr>
<td width="90%" valign="top" style="line-height:1.5em;">
<span class="liteGreyColor textsize9">' . $update_time . ' <a href="profile.php?id=' . $update_username . '"><strong>' . $username . '</strong></a> via <em></em></span><br />
' . $item_content . '
</td>
</tr></table>'; }
然後倒在我使用HTML:<?php echo $updatestream ?>
但正如我所說,我得到什麼是絕對..任何人都可以發現,將導致此任何錯誤或失誤一般?謝謝:d
如果您有錯誤登錄,錯誤將出現在Web服務器的錯誤日誌中。 – jterrace 2011-03-20 03:11:37
你真的使用這個標題(*有沒有辦法檢查用戶屏幕分辨率?*),或者在stackoverflow數據庫中做了一些事情會感到困惑? – 2011-03-20 03:27:11
僅供參考,PHP有一個叫做[stream](http://us2.php.net/manual/en/book.stream.php)的核心概念,你不在這裏使用它們。要小心,錯誤地使用這個術語可能會在以後引起混淆。 – Charles 2011-03-20 04:10:38