ESH/includes/config/examples/sqlite.php

15 lines
490 B
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
require_once 'Log.php';
/* Creating a new database connection. */
$conf = array('filename' => 'log.db', 'mode' => 0666, 'persistent' => true);
$logger =& Log::factory('sqlite', 'log_table', 'ident', $conf);
$logger->log('logging an event', PEAR_LOG_WARNING);
/* Using an existing database connection. */
$db = sqlite_open('log.db', 0666, $error);
$logger =& Log::factory('sqlite', 'log_table', 'ident', $db);
$logger->log('logging an event', PEAR_LOG_WARNING);
sqlite_close($db);