3 if (!defined('ROOT_PATH'))
8 error_reporting(E_ALL
);
11 include(ROOT_PATH
. 'includes/functions.' . PHP_EXT
);
12 include(ROOT_PATH
. 'includes/functions_format.' . PHP_EXT
);
13 include(ROOT_PATH
. 'includes/class/module.' . PHP_EXT
);
14 include(ROOT_PATH
. 'includes/class/cute_url.' . PHP_EXT
);
17 foreach (array_diff(scandir(ROOT_PATH
. 'vendor/'), array('.', '..')) as $vendor)
19 if (file_exists(ROOT_PATH
. 'vendor/' . $vendor . '/vendor.' . PHP_EXT
))
21 include(ROOT_PATH
. 'vendor/' . $vendor . '/vendor.' . PHP_EXT
);
26 $module = new module(ROOT_PATH
. 'modules/', 'm_');
27 $cute_url = new cute_url(file_exists(ROOT_PATH
. '.htaccess'));
30 include(ROOT_PATH
. 'includes/class/dbal_mysqli.' . PHP_EXT
);
31 $db = new dbal_mysqli();
34 $db->sql_connect('localhost', NULL, 'cms', 'root', NULL);
38 echo '<h1>an error occured</h1>';
39 echo $e->getMessage();
44 $template->assign('ROOT_PATH', $_SERVER['SCRIPT_NAME'] === '/' ?
'/' : dirname($_SERVER['SCRIPT_NAME']) . '/');