Constant variables

You can access any of these constant variables in your scripts.

Constants

Variable/Key
Type
Default
Description
BASE_HTML_FILEPATH
string
https://bw.codes/
External path to your website's root directory. It will include a sub folder if you have not installed the BW Core in your website's public root folder.
ABSOLUTE_ROOT
string
/var/www/bw.codes/htdocs/
Internal filepath to your website's public root directory.
PAGE_FOLDER_FILEPATH
string
/var/www/bw.codes/htdocs/
Internal filepath to the folder in which the page was called from. If the page was called from a sub folder inside your website root directory, it will show in this path.
PAGE_FOLDER_HTML_FILEPATH
string
/
Absolute path without domain for including external scripts within HTML tags.
START_TIME
string
Unix Timestamp
Unix timestamp with microseconds when your 'common.php' file was included. Useful for timing functions.
BASE_CORE
string
/var/www/website.com/htdocs/core/
Internal absolute filepath to your website's 'core' folder.
CACHE_DIR
string
/var/www/bw.codes/htdocs/cache/
Internal filepath to the cache folder
LOGS_DIR
string
/var/www/bw.codes/htdocs/logs/
Internal filepath to your logs folder
WEBSITE_URL
string
https://bw.codes
External fully qualified domain name and protocol
COOKIE_DOMAIN
string
bw.codes
External fully qualified domain name without protocol
CURRENT_PAGE
string
index.php
Your web page's filename
PAGE_NAME
string
index
Your web page's filename without an extension
LAYOUT_NAME
string
default
The layout in use for your current page
WEBSITE_TOP
string
website.top.php
The layout file being used for the page's header
WEBSITE_BOTTOM
string
website.bottom.php
The layout file being used for the page's footer
HEAD_JS
json string
[]
JSON encoded array of the Javascript files to be loaded into your page for plugins
HEAD_CSS
json string
[]
JSON encoded array of the CSS files to be loaded into your page for plugins