[SOLVED] V2018 Path Questions


#1

When using V2 I had no issues storing a sqlite database in Data folder (in folder with software).

The software is not “portable” so all other information is stored in AppData but sqlite database was stored in Data folder.

I simply used
$database_name = $storagelocation."Data/data.db";

Seems something changed and now always looking in AppData folder for the database.

Also tried
$database_name = $storagelocation."data.db";

From the general demo I see (but no luck getting it working with my software):
$cont = file_get_contents($_SERVER['DOCUMENT_ROOT'].'\\include1.txt', FILE_USE_INCLUDE_PATH);

Need to have V2018 looking in Data folder for my database, how to do this?


#2
$data = $_SERVER['DOCUMENT_ROOT'].'/mydb.db';
$con = new SQLite3($data);

Good luck. ^^


#3

Thank you @wayos, much appreciated.

But now I am embarrassed… Had tried that but left out the leading _ (under score) after $.

Cheers!