我目前有以下使用 MySQL 的 PHP 文件,它应该返回 00:00 到 23:00 的结果(这是一个时间表),但是它只返回 01:00 到 23:00:
<?PHP
include("../panel/config.php");
#// Timetable Clearup Variabls
$yesterday = strtotime('yesterday');
$yesterdow = date('l',$yesterday);
$order = "SELECT * FROM timetable WHERE day = '$yesterdow' ORDER BY time LIMIT 0 , 30";
$result = mysql_query($order);
$yesterdayd = date('F jS, Y', time()-86400);
//SET XML HEADER
header('Content-type: text/xml');
//CONSTRUCT RSS FEED HEADERS
$output = '<rss version="2.0">';
$output .= '<channel>';
$output .= "<title>Timetable - {$yesterdayd} </title>";
$output .= '<description>Timetable.</description>';
$output .= '<link>http://www.site.com</link>';
while ($row = mysql_fetch_array($result)) {
//BODY OF RSS FEED
$output .= "<item><title>Timetable - {$yesterdayd}</title>
<description>";
while ($row=mysql_fetch_array($result))
{
$rowset[] = $row;
//BODY OF RSS FEED
$output .= htmlspecialchars($row['time']) . " " . htmlspecialchars($row['username']) . "<br/>";
}
$output .= '</description></item> ';
}
//CLOSE RSS FEED
$output .= '</channel>';
$output .= '</rss>';
//SEND COMPLETE RSS FEED TO BROWSER
$filename = "timetable.xml";
if (!$handle = fopen($filename, 'w')) {
echo "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (fwrite($handle, $output) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
if (fwrite($handle, $total) === FALSE) {
echo "Cannot write to file ($filename)";
exit;
}
echo "Success, wrote {$content}{$total} to file ($filename)";
fclose($handle);
?>
谁能解释一下