Example #1
0
 /**
  * Instanciem una nova base de dades
  */
 public function __construct()
 {
     $config = Configuracio::de('basededades');
     $this->configuracio = $config;
     // Connectem
     $this->pdo = new PDO("{$config['driver']}:host={$config['host']};dbname={$config['basededades']};charset={$config['charset']}", $config['usuari'], $config['contrasenya'], array(PDO::ATTR_PERSISTENT => true));
 }
Example #2
0
 public static function js($name)
 {
     $directori_bens = DS . Configuracio::de('aplicacio', 'directori_bens');
     return '<script type="text/javascript" src="' . $directori_bens . DS . 'scripts' . DS . $name . '.js"></script>';
 }