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

161.       * @param dbConfig  数据库配置
162.       */
163.      public function __construct($dbConfig)
164.      {
165.          $linkfunction = ( TRUE == $dbConfig['persistent'] ) ? 'mysql_pconnect' 'mysql_connect';
166.          $this->conn $linkfunction($dbConfig['host'].":".$dbConfig['port'], $dbConfig['user'], $dbConfig['password']) or JError("数据库链接错误 : " mysql_error()); 
167.          mysql_select_db($dbConfig['database'], $this->conn) or JError("无法找到数据库,请确认数据库名称正确!");
168.          $this->exec("SET NAMES " $dbConfig['charset']);
169.      }
170.      /**
171.       对特殊字符进行过滤
202.                  $argString .= $comma "\$args[$i]"$comma ', '
203.              }
204.          }
205.          
206.          if($registerGlobal) {
207.              eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);"); 
208.              return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.          }
210.          else {
211.              return new $className($argString);
212.          }
51.      {
52.          if( null == $this->tbl_name )$this->tbl_name $GLOBALS['G_JCONFIG']['db']['prefix'] . $this->table;
53.          if( '' == $GLOBALS['G_JCONFIG']['db_driver_path'] ){
54.              $GLOBALS['G_JCONFIG']['db_driver_path'] = $GLOBALS['G_JCONFIG']['drivers_dir'].'/'.$GLOBALS['G_JCONFIG']['db']['driver'].'.php';
55.          }
56.          $this->_db JLoadClass('db_'.$GLOBALS['G_JCONFIG']['db']['driver'], array(0=>$GLOBALS['G_JCONFIG']['db']), $GLOBALS['G_JCONFIG']['db_driver_path']);
57.      }
58. 
59.      /**
60.       开始事务
61.       */
202.                  $argString .= $comma "\$args[$i]"$comma ', '
203.              }
204.          }
205.          
206.          if($registerGlobal) {
207.              eval("\$GLOBALS['G_JCONFIG']['class_instances'][\$className]= new \$className($argString);"); 
208.              return $GLOBALS['G_JCONFIG']["class_instances"][$className];
209.          }
210.          else {
211.              return new $className($argString);
212.          }
1083.      }
1084.      /**
1085.       将出版图书列表(栏目分页)
1086.       */
1087.      function comingAction() {
1088.          $books JLoadClass('books');
1089.          $page intval(max($this->JArgs('page'), 1));
1090.          
1091.          $cond = array(
1092.              'status' => 1,
1093.              'publication_status' => 0,
26.          eval($GLOBALS['G_JCONFIG']["dispatcher_error"]);
27.          exit;
28.      }
29. 
30.      // 执行用户代码    
31.      $__handle_controller->$__actionFunc();
32. 
33.      //显示前执行自定义代码
34.      JInject("before_display");
35. 
36.      // 控制器程序运行完毕,进行模板的自动输出
40.  if(count($server_info) > 1) {
41.      $server_domain $server_info[count($server_info)-2];
42.      define('DOMAIN'$server_domain);
43.  }
44. 
45.  JStart();
46.  ?>