Answer the question
In order to leave comments, you need to log in
When creating a database on SQLite3, it gives the error "Fatal error: Uncaught Error: Class 'SQLite3' not found", how to fix it?
Hello. This link has the same problem, but there is a person on Linux-e, and that solution did not suit me, so I decided to ask. I am using OpenServer.
I am studying at the same course, therefore the same code in which the SQLite database is created:
require "INewsDB.class.php";
class NewsDB implements INewsDB{
const DB_NAME = "../news.db";
const ERR_PROPERTY = "Wrong property name";
private $_db;
function __construct(){
$this->_db = new SQLite3(self::DB_NAME);
}
function __destruct(){
unset($this->_db);
}
function __get($name){
if($name == "db"):
return $this->_db;
else:
throw new Exception(self::ERR_PROPERTY);
endif;
}
function __set($name, $value){
throw new Exception(self::ERR_PROPERTY);
}
function saveNews($title, $category, $description, $source){
}
function getNews(){
}
function deleteNews($id){
}
}
$news = new NewsDB();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question