本文整理匯總了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'];