I have a database moja.db created with DB Browser for SQLite.
I created gridtest.php with code:
I get message Please check your database connection configuration. Connection attempt failed: SQLSTATE[HY000]  unable to open database file
What do I have to do to make it work?
Sorry, code didnt displayed in previouse message.
$db_conf = array();
$db_conf[“type”] = “pdo”; // mysql,oci8(for oracle),mssql,postgres,sybase
$db_conf[“server”] = “sqlite:moja.db”;
$db_conf[“user”] = “”;
$db_conf[“password”] = “”;
$db_conf[“database”] = “moja”;
If your database and grid code file reside in same folder, try
$db_conf[“server”] = “sqlite:./moja.db”;
Added ./ before moja.db.
You can also refer working demo:
Abu Ghufran - Dev Team
Grid 4 PHP Framework
You don’t need to set db. Make it blank.
$db_conf[“database”] = “”;
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?