数据库链接错误 : No such file or directory

73.       * @param dbConfig  数据库配置
74.       */
75.      public function __construct($dbConfig)
76.      {
77.          $linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' 'mysql_connect';
78.          $this->conn $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['login'], $dbConfig['password']) or spError("数据库链接错误 : " mysql_error()); 
79.          mysql_select_db($dbConfig['database'], $this->conn) or spError("无法找到数据库,请确认数据库名称正确!");
80.          $this->exec("SET NAMES UTF8");
81.      }
82. 
83.      /**
150.          }
151.      }
152.      if(FALSE != $has_define){
153.          $argString '';$comma ''
154.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
155.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
156.          return $GLOBALS['G_SP']["inst_class"][$class_name];
157.      }
158.      spError($class_name."类定义不存在,请检查。");
159.  }
160. 
47.      {
48.          if( null == $this->tbl_name )$this->tbl_name $GLOBALS['G_SP']['db']['prefix'] . $this->table;
49.          if( '' == $GLOBALS['G_SP']['db_driver_path'] ){
50.              $GLOBALS['G_SP']['db_driver_path'] = $GLOBALS['G_SP']['sp_drivers_path'].'/'.$GLOBALS['G_SP']['db']['driver'].'.php';
51.          }
52.          $this->_db spClass('db_'.$GLOBALS['G_SP']['db']['driver'], array(0=>$GLOBALS['G_SP']['db']), $GLOBALS['G_SP']['db_driver_path']);
53.      }
54.      
55.      public function conn_other_db($db_config){
56.          if( null == $this->tbl_name )$this->tbl_name $GLOBALS['G_SP']['db']['prefix'] . $this->table;
57.              $this->_db spClass('db_mysql', array($db_config), SP_PATH.'/Drivers/mysql.php'true);
150.          }
151.      }
152.      if(FALSE != $has_define){
153.          $argString '';$comma ''
154.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
155.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
156.          return $GLOBALS['G_SP']["inst_class"][$class_name];
157.      }
158.      spError($class_name."类定义不存在,请检查。");
159.  }
160. 
1044. 
1045. 
1046. 
1047.      private function c_gettoprs(){
1048. 
1049.          $articlestyle spClass('articlestyle');
1050. 
1051.          $condition = array("frontdisplay"=>1);
1052. 
1053.          if ($list_rs $articlestyle->findAll(nullnull"sid, islist, outlink")) {
1054. 
908. 
909.      //接口方法
910. 
911.      protected function c_default(){
912. 
913.          $this->c_gettoprs();
914. 
915.      }
916. 
917. 
918. 
6. 
7.      public function __construct(){
8. 
9.          parent::__construct();
10. 
11.          $this->c_default();
12. 
13.      }
14. 
15. 
16. 
150.          }
151.      }
152.      if(FALSE != $has_define){
153.          $argString '';$comma ''
154.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
155.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
156.          return $GLOBALS['G_SP']["inst_class"][$class_name];
157.      }
158.      spError($class_name."类定义不存在,请检查。");
159.  }
160. 
10.      GLOBAL $__controller$__action;
11.      
12.      // 对路由进行自动执行相关操作
13.      spLaunch("router_prefilter");
14.      // 对将要访问的控制器类进行实例化
15.      $handle_controller spClass($__controllernull$GLOBALS['G_SP']["controller_path"].'/'.$__controller.".php");
16.      // 调用控制器出错将调用路由错误处理函数
17.      if(!is_object($handle_controller) || !method_exists($handle_controller$__action)){
18.          eval($GLOBALS['G_SP']["dispatcher_error"]);
19.          exit;
20.      }
31.          )
32.       )
33.      */
34.  );
35.  require("base.php");
36.  spRun();
37.  ?>