我希望在NetBeans中实现SQLite和PHP之间的连接。我已经在SQLite中成功创建了数据库,并且连接也成功完成。现在我想执行简单的查询,所以我写了下面的代码。但它显示
致命错误:Class 'SQLite3' not found in C:\Users\Akshay\Documents\NetBeansProjects\Sample\index.php on line 15
<?php
/**
* Simple example of extending the SQLite3 class and changing the __construct
* parameters, then using the open method to initialize the DB.
*/
class MyDB extends SQLite3
{
function __construct()
{
$this->open('C:\\SQLITE\\TravelMate.db');
}
}
$db = new MyDB();
$result = $db->query('SELECT * FROM admin');
var_dump($result->fetchArray());
?>