数据库链接错误 : 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.          }
802.          $searchType $this->JArgs('searchType');
803.          $lang $this->getLang();
804.          $page intval(max($this->JArgs('page'), 1));
805.          
806.          if($category_id) {
807.              $categories JLoadClass('categories');
808.              if($category $categories->getOne(array('content_id' => $category_id'language'=> $lang))) {
809.                  $cond = array(
810.                      'status' => 1,
811.                      'language' => $lang,
812.                      'category_id' => $category_id,
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.  ?>