Copy .env.example to .env at the project root. Loaded by back/sys/env.php before config.
SITE_SSL=0
SITE_ERRORS=1
SITE_PROD=0
SITE_BUILD=0
DB_CLASS=seed
DB_USER=root
DB_PASS=
TOKEN_KEY=
back > sys > config.php
define('SITE_PUBLIC', $_PROTOCOL.$_HOST.'/');
define('SITE_SSL', (int)env('SITE_SSL',$_SSL));
define('SITE_ERRORS', (int)env('SITE_ERRORS',1));
define('SITE_PROD', (int)env('SITE_PROD',0));
define('SITE_BUILD', (int)env('SITE_BUILD',0));
define('DIR_PUBLIC',$_DIR.'public/');
define('DIR_CACHE',$_DIR.'front/cache/');
define('DB_CLASS', env('DB_CLASS','seed'));
define('DB_USER', env('DB_USER','root'));
define('DB_PASS', env('DB_PASS',''));
define('TOKEN_KEY', env('TOKEN_KEY',''));
| Name | Description | Default |
|---|---|---|
| SITE_PUBLIC | Website home URL | http(s)://host/ |
| SITE_ERRORS | PHP error display | 1 |
| SITE_PROD | Production mode (minify JS when building) | 0 |
| SITE_SSL | Force HTTPS redirect | 0 |
| SITE_BUILD | Auto-rebuild public/ assets when sources change |
0 |
| DB_CLASS | Database adapter: seed, db, or elastic | seed |
| TOKEN_KEY | JWT signing key (set in .env) | |
| DIR_PAGE | Routing directory | front/html/pages/ |
| DIR_PUBLIC | Built assets output | public/ |
| FILE_APP | Application bootstrap | back/sys/app.php |
Array of the URL path elements between slashes
// http://www.website.com/about/john
print_r($_URL);
/*OUTPUTS
Array
(
[0] => about
[1] => john
)
*/
print_r($_URL_VARS);
/*OUTPUTS
Array
(
[0] => john
)
*/
echo $_PAGE;
/*OUTPUTS
about
*/