2016-06-28 92 views

回答

1

这为我工作的解决方案是这样..

static function db() 
    { 
     try { 
      $db = DB::connection()->getPdo(); 
     } 
     catch (PDOException $e) { 
      self::fatal(
       "An error occurred while connecting to the database. ". 
       "The error reported by the server was: ".$e->getMessage() 
      ); 
     } 
     return $db; 
    } 

通过调用..

$db=self::db(); 

$db::PARAM_STR 

我解决了它。所有内部类&方法

相关问题