WME Global Variables

For development convenience, WME supplies several PHP global variables. These variables can be accessed at any time as long as your WME page follows the template.* They are listed below.

* Note: Before WME globals can be accessed inside user-defined functions, you must first call global $_WME within the function.

VariableTypeReturn Definition
$_WME['DB_SERVER']Database AccessDatabase server name
$_WME['DB_USERNAME']Database AccessDatabase username
$_WME['DB_PASSWORD']Database AccessDatabase password
$_WME['DB_DATABASE']Database AccessDatabase name
$_WME['FS_ROOT_DIR']FilesystemWME root directory on filesystem
$_WME['FS_INCLUDES_DIR']FilesystemWME includes directory on filesystem
$_WME['FS_TEMPLATES_DIR']FilesystemWME templates directory on filesystem
$_WME['FS_TM_DIR']FilesystemWME TM directory on filesystem
$_WME['WS_URL']WebsiteWME site root URL
$_WME['WS_ADMIN_URL']WebsiteWME site admin URL
$_WME['WS_TLPADMIN_URL']WebsiteWME site TLP admin URL (for page editing)
$_WME['WS_IMAGE_URL']WebsiteWME site image URL
$_WME['WS_STYLESHEETS_URL']WebsiteWME site stylesheets URL
$_WME['WS_COURSE_URL']WebsiteWME site course URL
$_WME['WS_TM_URL']WebsiteWME site TM URL
$_WME['WS_TOOLS_URL']WebsiteWME site tools URL
$_WME['WS_CONTACT_URL']WebsiteWME site contact URL
$_WME['WS_HELP_URL']WebsiteWME site help URL
$_WME['SCHOOL_NAME']SchoolSchool name
$_WME['SCHOOL_ADDRESS']SchoolSchool address
$_WME['SCHOOL_CONTACT_PERSON']SchoolContact person of school
$_WME['SCHOOL_CONTACT_EMAIL']SchoolSchool contact email
$_WME['SCHOOL_CONTACT_WEBSITE']SchoolSchool Website (if different from WME site)

Back to Topics