我的代码:
        require_once ("DB.php");
        $dsn = array(
                      'phptype' => "oci8",
                      'hostspec' => "172.19.xxx.xxx",
                      'username' => "username",
                      'password' => "password",
                      'database' => "db"
         );        $dbh = DB::connect($dsn);
当走到require_once ("DB.php");的时候就特别慢,然后就不往下走了,是为什么?

解决方案 »

  1.   

    看看oci是否正常安装,还有就是数据库是否可以连接
      

  2.   

    先用$conn->getDebugInfo()看看详细的错误信息。   
      

  3.   

    require_once ("DB.php"); 先不用这个,直接把DB.php中要用的代码拿过来测试,再一行一行跟进,。
      

  4.   

            if (isset($options['debug']) && $options['debug'] >= 2) {
                // expose php errors with sufficient debug level
                include_once "DB/${type}.php";
            } else {
                @include_once "DB/${type}.php";
            }
    我发现就是跑到红色那一行就没反应了,这段代码是在DB.php里的DB/${type}.php即:oci8.php
      

  5.   

     到这一行:@include_once "DB/${type}.php";