Create a folder called ./core/
. In this folder add a file called init.php
. In this file you will have to add the following content:
<?php
session_start();
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '',
'username' => '',
'password' => '',
'db' => 'CCTournaments'
),
'session' => array(
'session_name' => 'user'
),
'cookie' => array(
'cookie_name' => 'login_token'
),
'validation' => array(
'namemin' => 3,
'namemax' => 15,
'passwordmin' => 4,
'passwordmax' => 25
),
'picture_extension' => array(
'jpg',
'jpeg',
'png',
'tiff',
'gif',
'bmp',
'bpg'
)
);
spl_autoload_register(function($class) {
require_once 'classes/' . $class . '.php';
});