http://www.php.net/manual/en/sqlite3.open.php暗示我应该这样做:
class DB extends SQLite3{
function __construct(){
$this->open('database.db');
}
}
$db = new DB();
$db->query("CREATE TABLE derp(asdf, asdf)");
在此:
$db = SQLite3::open('database.db');
SQLite3::query("CREATE TABLE derp(asdf, asdf)");
为什么 PHP.net 的人们会有一个扩展 SQLite3 的类的示例?