100(net :: ERR_CONNECTION_CLOSED):连接意外关闭了

时间:2012-01-27 11:49:06

标签: php apache

我从chrome得到了这个错误(所有其他浏览器显示为空白),问题是,我看不到错误..我的页面上有很多代码,我似乎没有找到导致错误..你能帮帮我吗?!?!因为我不知道它为什么会引起

我从我的PHP代码中获取它并且我正在使用Dreamweaver。

这是我的连接定义方式:

   <?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_QASite = "localhost";
$database_QASite = "qasite";
$username_QASite = "root";
$password_QASite = "";
$QASite = mysql_connect($hostname_QASite, $username_QASite, $password_QASite) or trigger_error(mysql_error(),E_USER_ERROR); 
?>

    if ((isset($_POST['topic_id'])) && ($_POST['topic_id'] != "")) {
  $deleteSQL = sprintf("DELETE FROM topic WHERE topic_id=%s",
                       GetSQLValueString($_POST['topic_id'], "int"));

  mysql_select_db($database_QASite, $QASite);
  $Result1 = mysql_query($deleteSQL, $QASite) or die(mysql_error());
}

其他一些PHP代码:

if ((isset($_POST['sub_topic_id'])) && ($_POST['sub_topic_id'] != "")) {
  $deleteSQL = sprintf("DELETE FROM sub_topic WHERE sub_topic_id=%s",
                       GetSQLValueString($_POST['sub_topic_id'], "int"));

  mysql_select_db($database_QASite, $QASite);
  $Result1 = mysql_query($deleteSQL, $QASite) or die(mysql_error());

  $deleteGoTo = "/QASite/Admin/main.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
    $deleteGoTo .= $_SERVER['QUERY_STRING'];
  }
 // header(sprintf("Location: %s", $deleteGoTo));
}

mysql_select_db($database_QASite, $QASite) or die(mysql_error());

// FUNCTIONS THAT INSERT AND MODIFY THE TOPICS
if(isset($_POST['update_topic']))
{
    UpdateTopic();
}
else if(isset($_POST['insert_topic_submit']))
{
   InsertSubTopic();
}
else if(isset($_POST['update_sub_topic']))
{

    UpdateSubTopic();
}
else if(isset($_POST['insert_topic']))
{
    InsertTopic();
}

1 个答案:

答案 0 :(得分:0)

确保将PHP配置为显示错误。另外,请检查PHP错误日志。