app > core > sys > config.php
//SITE
define('SITE_PUBLIC', $_SERVER['HTTP_HOST'].'/');
define('SITE_ERRORS', 0);
define('SITE_SSL', 0);
define('SITE_WWW', 0);
define('SITE_URL_INDEX',1);
//DIRECTORIES
define('DIR_BACK',getcwd().'/back/');
define('DIR_APP',getcwd().'/back/app/');
define('DIR_SYS',getcwd().'/back/sys/');
define('DIR_DB',getcwd().'/back/db/');
define('DIR_FRONT',getcwd().'/front/');
define('DIR_PAGE',getcwd().'/front/html/pages/');
define('DIR_TEMP',getcwd().'/front/html/templates/');
// FILES
define('FILE_APP',getcwd().'/back/sys/app.php');
//DATABASE
define('DB_SERVER', "http://localhost:9200");
define('DB_NAME', 'db');
define('DB_USER', 'root');
define('DB_PASS', 'password');
Name | Description | Default |
---|---|---|
SITE_PUBLIC | Website Home URL | $_SERVER['HTTP_HOST'] |
SITE_ERRORS | Turns PHP Error Printing On | 1 |
SITE_SSL | Forces HTTPS Protocol | 0 |
SITE_WWW | Forces www in url | 0 |
SITE_URL_INDEX | URL index of the root of the application | 1 |
DIR_FRONT | Front end Directory | front |
DIR_APP | Application Directory | back > app |
DIR_PAGE | Routing Directory | front > html > pages |
DIR_TEMP | Template Directory | front > html > templates |
FILE_APP | Application File | back > sys > app.php |
If you have the framework in a sub-folder of a domain, rather than the root folder,
than you should set the index to the level of the sub folder
For example, if the PAX framework is in http://www.website.com/sub/
than you would set the SITE_URL_INDEX to 2
Array of the URL path elements between slashes
// http://www.website.com/about/john
print_r($_URL);
/*OUTPUTS
Array
(
[0] => about
[1] => john
)
*/
echo $_PAGE;
/*OUTPUTS
about
*/