ares413
New Member
- Joined
- Apr 1, 2010
- Messages
- 130
- Reaction score
- 3
when trying to connect to the database i get this error
but my ots_db_sqlite.php file reads as following:
why wont this work? help rep ++
Code:
Parse error: syntax error, unexpected ';', expecting T_FUNCTION in C:\xampp\htdocs\pot\OTS_DB_SQLite.php on line 68
but my ots_db_sqlite.php file reads as following:
PHP:
<?php
/**#@+
* @version 0.0.1
*/
/**
* @package POT
* @version 0.1.3
* @author Wrzasq <[email protected]>
* @copyright 2007 (C) by Wrzasq
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public License, Version 3
*/
/**
* SQLite connection interface.
*
* <p>
* At all everything that you really need to read from this class documentation is list of parameters for driver's constructor.
* </p>
*
* @package POT
* @version 0.1.3
*/
class OTS_DB_SQLite extends OTS_Base_DB
{
/**
* Creates database connection.
*
* <p>
* Connects to SQLite database on given arguments.
* <p>
*
* <p>
* List of parameters for this drivers:
* </p>
*
* <ul>
* <li><var>database</var> - database name.</li>
* </ul>
*
* @version 0.0.7
* @param array $params Connection parameters.
* @throws PDOException On PDO operation error.
*/
public function __construct($params)
{
if( isset($params['prefix']) )
{
$this->prefix = $params['prefix'];
}
// PDO constructor
try
{
parent::__construct('sqlite:' . $params['database']);
}
catch(PDOException $error)
{
echo 'Can\'t connect to SQLite database.</font>';
exit;
}
}
/**#@-*/
?>
why wont this work? help rep ++