The option is to configure the SQLite database in a directory outside your htdocs folder. This means that people cannot enter the database file name and load the entire database, seriously compromising security.
If you are so addicted, you can even create an abstraction layer between PHP and the DBMS using PDO . Then, to create the database object, you must specify a SQLite specific DSN , write something like this:
$pdo_obj = new PDO('sqlite:/path/to/my_database.sqlite3');
and then query it like a regular PDO using PDO functions.
This method will make it easier to simplify the transition to using a client-server DBMS as soon as you can get one setting; it's just a matter of copying the table structure and data into a new database and changing the DSN to something suitable .
amphetamachine
source share