数据库链接错误 : 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.      /**
166.          }
167.      }
168.      if(FALSE != $has_define){
169.          $argString '';$comma ''
170.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
171.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
172.          return $GLOBALS['G_SP']["inst_class"][$class_name];
173.      }
174.      spError($class_name."类定义不存在,请检查。");
175.  }
176. 
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);
166.          }
167.      }
168.      if(FALSE != $has_define){
169.          $argString '';$comma ''
170.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
171.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
172.          return $GLOBALS['G_SP']["inst_class"][$class_name];
173.      }
174.      spError($class_name."类定义不存在,请检查。");
175.  }
176. 
525.      private function c_defaultaddsitemapurl(){
526.          
527.      }
528.      
529.      private function c_gettoprs(){
530.          $articlestyle spClass('articlestyle');
531.          $condition = array("frontdisplay"=>1);
532.          if ($list_rs $articlestyle->findAll(nullnull"sid, islist, outlink")) {
533.              foreach ($list_rs as $key => $val){
534.                  if ($val['outlink']) {
535.                      $root_columnurl[$val['sid']] = $columnurl[$val['sid']] = substr($val['outlink'],0,7) !== "http://" WEB_ROOT."/".$val['outlink'] : $val['outlink'];
457.          }
458.      }
459.      
460.      //接口方法    
461.      protected function c_default(){
462.          $this->c_gettoprs();
463.      }
464.      
465.      private function c_default404(){
466.          if ($_SERVER['REQUEST_URI'] !== WEB_ROOT."/" && strpos($_SERVER['REQUEST_URI'], WEB_ROOT."/"."index.php") === false) {
467.              $url WEB_ROOT."/nofound.php";
2.  class ZAction extends spController {
3.      
4.      public function __construct(){
5.         
6.          parent::__construct();
7.          $this->c_default();
8.      }
9.      
10.      function index(){
11.          $this->is_index 1;
12.      }
2.  require(APP_PATH  DS "libs" DS "zxinit.php");
3. 
4.  class main extends ZAction {
5.      
6.      public function __construct(){
7.          parent::__construct();
8.          try{
9.              
10.          }catch(Exception $e){
11.              
12.          }
166.          }
167.      }
168.      if(FALSE != $has_define){
169.          $argString '';$comma ''
170.          if(null != $args)for ($i 0$i count($args); $i ++) { $argString .= $comma "\$args[$i]"$comma ', '; } 
171.          eval("\$GLOBALS['G_SP']['inst_class'][\$class_name]= new \$class_name($argString);"); 
172.          return $GLOBALS['G_SP']["inst_class"][$class_name];
173.      }
174.      spError($class_name."类定义不存在,请检查。");
175.  }
176. 
25.      }
26.      */
27.      /* 根据路由重定向全局方法 end */
28.      // 对将要访问的控制器类进行实例化
29.      
30.      $handle_controller spClass($__controllernull$GLOBALS['G_SP']["controller_path"].'/'.$__controller.".php");
31. 
32.      // 调用控制器出错将调用路由错误处理函数
33.      if(!is_object($handle_controller) || !method_exists($handle_controller$__action)){
34.          eval($GLOBALS['G_SP']["dispatcher_error"]);
35.          exit;
34.          )
35.       )
36.      */
37.  );
38.  require("base.php");
39.  spRun();
40.  ?>