还有Warning: mysql_connect(): Unknown MySQL Server Host 'virtualdb' (11001) in H:\Web\PHP\edayday\php\inc\dbfunc.php on line 18

解决方案 »

  1.   

    well, the first two warnings concerning 
    session_start() are because you can not
    echo/print any string if in the php file
    you do something with http head. You 
    simply comment those echo/print lines
    to debug.concerning the first mysql bug, you have
    not connected to mysql. try the followed
    code.$DbHost     = "localhost";
    $DbUser     = "root";
    $DbPassword = "";
    $DbDatabase = "yourdb";
    mysql_pconnect($DbHost,$DbUser,$DbPassword)
        or die("Database access error. Please contact with the site administrator.");mysql_select_db($DbDatabase);$query1 = "SELECT * FROM mysql";
    $result1  = mysql_query($query1);if you still get warnings, post them to here..good luck
      

  2.   

    Warning: mysql_connect(): Unknown MySQL Server Host 'virtualdb' (11001)
    出现这个出错信息时,通常是名为 'virtualdb' 计算机不存在于网络中
    你确定有这个名的计算机在网络中正常运行着吗??