Connecting to a Sqlite
The database connection is established in a global variable called $DBA in the index.php file for convenience, you could put it anywhere as long as it is global and required before any database functionality is required. For testing purpose, you can use the SQLite database type below.
It is important you set your Global Variables in the .env , like isername and password etc.
For SQLite database type:
<?php
require_once "./vendor/autoload.php";
//Initialize Sqlite Database Connection
global $DBA;
$DBA = new \Tina4\DataSQLite3("cms.db","DB_Username", "DB_Password", "d/m/Y");
$config = new \Tina4\Config();
\Tina4\Initialize();
echo new \Tina4\Tina4Php($config);
Tina4 is a dynamic system and should already have the tools you need, but due to Tina4 being Bleeding Edge tech, there might be a chance you have trouble with the database, thus run the following commands to install the Database and MySQL files required for your system:
composer require tina4stack/tina4php-sqlite3
composer require tina4stack/tina4php-database
For a custom database hostname and port use the following format in your ENV file
DB_NAME=10.248.228.22/3306:databasename
Examples:
Notice the convention of using the hostname:[path] - in SQLite hostname becomes the local path.