0

我正在使用 Wampserver 2.0 进行数据库 Web 开发。当我运行以下嵌入在我的 html 表单中的 php 代码时,服务器崩溃,同时不同页面上的其他 php 进程正在有效响应。我检查了我的 apache 错误日志并看到以下消息:[Fri Oct 22 11:37:04 2010] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/setapro/setapro, referer :这是我执行的 php 代码:

<?php 
include 'db_inc.php';
$sql    = "select AVG(no_of_satelites) as 'Mean Number of Satelites', AVG(         height_of_geoid ) as'Mean of HDOP', AVG(rmc_gga_longitude) as 'Mean of Longitude', AVG(rmc_gga_latitude) as 'Mean of latitude'  FROM total_rmcs_ggas ";
$result = mysql_query($sql, $link);
if (!$result) {
die("Query to show averages from table failed");
}
echo 'Number of rows returned from query = '.mysql_num_rows($result) or die();
echo "<h2>Table:Averages for the GPS Receiver</h2>";
while ($row = mysql_fetch_assoc($result)){
echo $row['Mean Number of Satelites'].' '.$row['Mean of HDOP'].' '.$row['Mean of  Longitude'].' '.$row['Mean of latitude'].'<br />';
}
mysql_free_result($result);
mysql_close();
?>  

我不知道它在谈论哪个文件,因为我的文档根目录中有所有文件。我在这里需要一些帮助。谢谢你。“setapro”是项目文件夹名称而不是文件。

4

1 回答 1

0

我刚刚发现 mysql_close() 是空的,我必须像这样在其中包含资源:mysql_close($link)。没有这个,服务器就会崩溃。

于 2010-10-22T10:51:26.360 回答