我在win2003安装的php是PHP Version 5.3.10,在phpinfo()里mysql显示是mysqlnd 5.0.8-dev ,而我安装的mysql版本是5.5.21,我在php连接数据库用@ $db = new mysqli("localhost","bookorama","bookorama123","books");
和用$db=mysql_connect("yh","root","753951","books");
直接提示:您指定的网页无法访问!  
错误类型:500我的php环境:win2003下用iis6.0+PHP Version 5.3.10+mysqlnd 5.0.8-dev 
在phpinfo()环境里显示:
Configuration File (php.ini) Path C:\WINDOWS   
Loaded Configuration File D:\php\php.ini   
display_errors On On 到底是哪里的问题,大仙们,请教了

解决方案 »

  1.   

    win2003?感觉好古老自己配置有点麻烦,我初学,xp系统下干脆用wamp,自动整合apache、mysql、php
      

  2.   

    你怎么还没搞清mysql_connect()的用法啊? 第一个参数是mysql服务器地址。$db=mysql_connect("localhost","root","753951"); //这样能连上吗?
      

  3.   

    直接提示:您指定的网页无法访问!   
    错误类型:500
    明显是php代码有啥问题...error_log里是报啥内容呢?...
      

  4.   

    端口号是多少?
    $db=mysql_connect("localhost:3306","root","753951");
    或者
    $db=mysql_connect("127.0.0.1:3306","root","753951");
      

  5.   

    大侠,提示:FastCGI Error
    The FastCGI Handler was unable to process the request. 
    --------------------------------------------------------------------------------Error Details:The FastCGI process exceeded configured activity timeout 
    Error Number: 258 (0x80070102). 
    Error Description: µÈ´ýµÄ²Ù×÷¹ýʱ¡£ 
    HTTP Error 500 - Server Error.
    Internet Information Services (IIS)
      

  6.   

    浏览器、php代码、数据库编码是否一致?
      

  7.   

    重启一下mysql试试
      

  8.   

    <?php
       $searchtype=$_POST['searchtype'];
      $searchterm=trim($_POST['searchterm']);  if (!$searchtype || !$searchterm) {
         echo 'You have not entered search details.  Please go back and try again.';
         exit;
      }  if (!get_magic_quotes_gpc()){
        $searchtype = addslashes($searchtype);
        $searchterm = addslashes($searchterm);
      } @ $db = new mysqli('localhost:8080','bookorama','bookorama123','books');  $query = "select * from books where ".$searchtype." like '%".$searchterm."%'";
      $result = $db->query($query);  $num_results = $result->num_rows;  echo "<p>Number of books found: ".$num_results."</p>";  for ($i=0; $i <$num_results; $i++) {
         $row = $result->fetch_assoc();
         echo "<p><strong>".($i+1).". Title: ";
         echo htmlspecialchars(stripslashes($row['title']));
         echo "</strong><br />Author: ";
         echo stripslashes($row['author']);
         echo "<br />ISBN: ";
         echo stripslashes($row['isbn']);
         echo "<br />Price: ";
         echo stripslashes($row['price']);
         echo "</p>";
      }  $result->free();
      $db->close();
      

  9.   

    <?php
       @ $db = new mysqli('localhost:8080','bookorama','bookorama123','books');
     if (!$db) {
    echo 'Error: Could not connect to database.  Please try again later.';
     exit;
    }   $query = "select * from books where isbn like '%31509%'";
      $result = $db->query($query);  $num_results = $result->num_rows;  echo "<p>Number of books found: ".$num_results."</p>";  for ($i=0; $i <$num_results; $i++) {
         $row = $result->fetch_assoc();
         echo "<p><strong>".($i+1).". Title: ";
         echo htmlspecialchars(stripslashes($row['title']));
         echo "</strong><br />Author: ";
         echo stripslashes($row['author']);
         echo "<br />ISBN: ";
         echo stripslashes($row['isbn']);
         echo "<br />Price: ";
         echo stripslashes($row['price']);
         echo "</p>";
      }  $result->free();
      $db->close();?>
    什么也没有显示,为什么
      

  10.   

    $num_results = $result->num_rows; 这行下面加上:
       echo $num_results  //值是多少
      

  11.   

    你装了FastCGI把。
    CGI引擎没配置好导致模块载入error