本文整理汇总了PHP中game::load_config方法的典型用法代码示例。如果您正苦于以下问题:PHP game::load_config方法的具体用法?PHP game::load_config怎么用?PHP game::load_config使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类game
的用法示例。
在下文中一共展示了game::load_config方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: sql
include 'include/race_data.php';
include 'include/sql.php';
include 'include/functions.php';
// #############################################################################
// SQL-Object for Database connection
$db = new sql($config['server'] . ":" . $config['port'], $config['game_database'], $config['user'], $config['password']);
// create sql-object for db-connection
if (isset($_GET['sql_debug'])) {
$db->debug = true;
}
// #############################################################################
// Game-Object
$game = new game();
// #############################################################################
// Config load and evaluate
$game->load_config();
$ACTUAL_TICK = $NEXT_TICK = 0;
$ACTUAL_TICK = $game->config['tick_id'];
$NEXT_TICK = $game->config['tick_time'] - $game->TIME;
$LAST_TICK_TIME = $game->config['tick_time'] - 5 * 60;
// #############################################################################
// Session-System
include 'include/session.php';
if ($game->config['game_stopped'] == 1 && $game->player['user_auth_level'] != STGC_DEVELOPER) {
message(GENERAL, $game->config['stop_message']);
}
$game->init_player();
if (isset($_POST['user_notepad'])) {
$sql = 'UPDATE user
SET user_notepad = "' . $db->escape_string($_POST['user_notepad']) . '"
WHERE user_id = ' . $game->player['user_id'];