initDB.php 296 B

1234567891011
  1. <?php
  2. include_once '../util/Logger.php';
  3. include_once "../conf/Config.inc";
  4. print "database is " . $GLOBALS["DB_PATH"] . "\n";
  5. $db = new PDO("sqlite:" . $GLOBALS["DB_PATH"]);
  6. $sql = file_get_contents(realpath( $GLOBALS["DB_PATH"] );
  7. $db->exec($sql) or die(print_r($db->errorInfo(), true));
  8. ?>