How To Put Sqlite Database Outside Of Web Directory
Sqlite Database is a simple flat file database. It works with SQL command thus make it a flexible; it can be copied and pasted. However, we may not want to expose this database to web users for download. In order to prevent web users from accessing the file directly, we can place it outside of web directory. |
We will be using adminer script to demonstrate this technique on Hostinger site. Create a directory in public_html, eg public_html/myproject/sdb Upload adminer to this folder. |
In your Web File Manager, navigate to the parent folder of public_html (root folder) and create a folder sdb.
Then, enter the database name with traversal path to that folder in adminer.
Wait for the success message.
Check in the sdb folder to see that the database exists.