jeudi 21 avril 2016

Sqlite (with PHP PDO) using local temp file on instead of specified sqlite db file

I am facing issue in php pdo / sqlite. Everything runs fine when It uses specified db file but sometimes it uses local temp file ( on different path ) in windows that creates problem.

Here is the code I am using for creating connection with sqlite.

$db_path = dirname(__DIR__).'/db/mysqlitedb.db';  
$con = new PDO("sqlite:".$db_path);  

Plz suugest any solution.

Thanks

Aucun commentaire:

Enregistrer un commentaire