initial commit
This commit is contained in:
20
src/wp_db_light.php
Normal file
20
src/wp_db_light.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__) . '/wp_db.php');
|
||||
|
||||
class WP_DB_LIGHT extends WP_DB
|
||||
{
|
||||
public $dbName;
|
||||
|
||||
function connect()
|
||||
{
|
||||
$databaseFile = '/sql/'.$this->dbName.'.db';
|
||||
$pdo = new PDO("sqlite:$databaseFile");
|
||||
|
||||
// Set the error mode to exception
|
||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
|
||||
return $pdo;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user