index.php
This is the file where SMF gets initialized. It defines common constants, loads the settings in Settings.php, ensures all the directory paths are correct, and includes some essential source files.
If this file is included by another file, the initialization is all that will happen. But if this file is executed directly (the typical scenario), then it will also instantiate and execute an SMF\Forum object.
Simple Machines Forum (SMF)
Tags
Table of Contents
Constants
- JQUERY_VERSION = '3.6.3'
- MYSQL_TITLE = 'MySQL'
- POSTGRE_TITLE = 'PostgreSQL'
- SMF = 1
- SMF_FULL_VERSION = 'SMF ' . \SMF_VERSION
- SMF_SETTINGS_BACKUP_FILE = \dirname(\SMF_SETTINGS_FILE) . '/' . \pathinfo(\SMF_SETTINGS_FILE, \PATHINFO_FILENAME) . '_bak.php'
- SMF_SETTINGS_FILE = __DIR__ . '/Settings.php'
- SMF_SOFTWARE_YEAR = '2025'
- SMF_USER_AGENT = 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
- SMF_VERSION = '3.0 Alpha 2'
- TIME_START = \microtime(\true)
Constants
JQUERY_VERSION
public
mixed
JQUERY_VERSION
= '3.6.3'
MYSQL_TITLE
public
mixed
MYSQL_TITLE
= 'MySQL'
POSTGRE_TITLE
public
mixed
POSTGRE_TITLE
= 'PostgreSQL'
SMF
public
mixed
SMF
= 1
SMF_FULL_VERSION
public
mixed
SMF_FULL_VERSION
= 'SMF ' . \SMF_VERSION
SMF_SETTINGS_BACKUP_FILE
public
mixed
SMF_SETTINGS_BACKUP_FILE
= \dirname(\SMF_SETTINGS_FILE) . '/' . \pathinfo(\SMF_SETTINGS_FILE, \PATHINFO_FILENAME) . '_bak.php'
SMF_SETTINGS_FILE
public
mixed
SMF_SETTINGS_FILE
= __DIR__ . '/Settings.php'
SMF_SOFTWARE_YEAR
public
mixed
SMF_SOFTWARE_YEAR
= '2025'
SMF_USER_AGENT
public
mixed
SMF_USER_AGENT
= 'Mozilla/5.0 (' . \php_uname('s') . ' ' . \php_uname('m') . ') AppleWebKit/605.1.15 (KHTML, like Gecko) SMF/' . \strtr(\SMF_VERSION, ' ', '.')
SMF_VERSION
public
mixed
SMF_VERSION
= '3.0 Alpha 2'
TIME_START
public
mixed
TIME_START
= \microtime(\true)