当前位置: 首页>>代码示例>>PHP>>正文


PHP TenYear::set_val方法代码示例

本文整理汇总了PHP中TenYear::set_val方法的典型用法代码示例。如果您正苦于以下问题:PHP TenYear::set_val方法的具体用法?PHP TenYear::set_val怎么用?PHP TenYear::set_val使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TenYear的用法示例。


在下文中一共展示了TenYear::set_val方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: load_settings

 public static function load_settings($settings_varname)
 {
     if (empty($settings_varname)) {
         die("System configuration file error");
     }
     define("OPERATOR_ID", isset($settings_varname['OPERATOR_ID']["varvalue"]) ? $settings_varname['OPERATOR_ID']["varvalue"] : 1);
     define("GAME_ID", isset($settings_varname['GAME_ID']["varvalue"]) ? $settings_varname['GAME_ID']["varvalue"] : 100);
     define("SERVER_ID", $settings_varname['SERVER_ID']["varvalue"]);
     define("AREA_ID", $settings_varname['AREA_ID']["varvalue"]);
     #区id
     define("SERVER_KEY", $settings_varname['SERVER_KEY']["varvalue"]);
     define("SERVER_TITLE", $settings_varname['SERVER_TITLE']["varvalue"]);
     define("QQ_PINGTA", isset($settings_varname['QQ_PINGTA']["varvalue"]) ? $settings_varname['QQ_PINGTA']["varvalue"] : 0);
     #QQ平台朋友[pengyou]或者空间[qzone]
     define("SHOW_TITLE", $settings_varname['SHOW_TITLE']["varvalue"]);
     #跨服显示用户的前缀用
     define("SERVER_DOMAIN", $settings_varname['SERVER_DOMAIN']["varvalue"]);
     define("MAIN_DOMAIN_URL", $settings_varname['MAIN_DOMAIN_URL']["varvalue"]);
     define("PROCESS_MAIN_IP", $settings_varname['PROCESS_MAIN_IP']["varvalue"]);
     define("MEDIA_SERVER_HOST", $settings_varname['MEDIA_SERVER_HOST']["varvalue"]);
     define("GATEWAY_DOMAIN", $settings_varname['GATEWAY_DOMAIN']["varvalue"]);
     define("GATEWAY_IP", $settings_varname['GATEWAY_IP']["varvalue"]);
     define("GATEWAY_PORT", $settings_varname['GATEWAY_PORT']["varvalue"]);
     define("SERVER_PORT", $settings_varname['SERVER_PORT']["varvalue"]);
     define("LINK_PAY_URL", isset($settings_varname['LINK_PAY_URL']["varvalue"]) ? $settings_varname['LINK_PAY_URL']["varvalue"] : "");
     define("LINK_PAY_URL", isset($settings_varname['LINK_PAY_URL']["varvalue"]) ? $settings_varname['LINK_PAY_URL']["varvalue"] : "");
     define("SERVER_START_TIME", isset($settings_varname['SERVER_START_TIME']["varvalue"]) ? $settings_varname['SERVER_START_TIME']["varvalue"] : 0);
     define("SERVER_STOP_TIME", isset($settings_varname['SERVER_STOP_TIME']["varvalue"]) ? $settings_varname['SERVER_STOP_TIME']["varvalue"] : 0);
     define("SERVER_STOP_ALLOW_IP", isset($settings_varname['SERVER_STOP_ALLOW_IP']["varvalue"]) ? $settings_varname['SERVER_STOP_ALLOW_IP']["varvalue"] : "");
     define("NOT_ALLOW_IP", isset($settings_varname['NOT_ALLOW_IP']["varvalue"]) ? $settings_varname['NOT_ALLOW_IP']["varvalue"] : "");
     define("SERVER_FIRST_START_TIME", $settings_varname['SERVER_FIRST_START_TIME']["varvalue"]);
     define("LINK_CLIENT_URL", isset($settings_varname['LINK_CLIENT_URL']["varvalue"]) ? $settings_varname['LINK_CLIENT_URL']["varvalue"] : "");
     define("ADULT_URL", isset($settings_varname['ADULT_URL']["varvalue"]) ? $settings_varname['ADULT_URL']["varvalue"] : "http://www.youzu.com");
     define("CROSS_ARENA_ID", isset($settings_varname['CROSS_ARENA_ID']["varvalue"]) ? $settings_varname['CROSS_ARENA_ID']["varvalue"] : 1);
     //跨服竞技场id
     define("SERVER_CPU_NUM", isset($settings_varname['SERVER_CPU_NUM']["varvalue"]) ? $settings_varname['SERVER_CPU_NUM']["varvalue"] : 4);
     //服务器CPU数量
     $dbConfig = array();
     $dbConfig["pconnect"] = isset($settings_varname['DBPCONNECT']["varvalue"]) ? $settings_varname['DBPCONNECT']["varvalue"] : 0;
     $dbConfig["setting"]["host"] = $settings_varname['DB_SETTING_HOST']["varvalue"];
     $dbConfig["setting"]["user"] = $settings_varname['DB_SETTING_USER']["varvalue"];
     $dbConfig["setting"]["pass"] = $settings_varname['DB_SETTING_PASS']["varvalue"];
     $dbConfig["setting"]["name"] = $settings_varname['DB_SETTING_NAME']["varvalue"];
     $dbConfig["game"]["host"] = $settings_varname['DBHOST']["varvalue"];
     $dbConfig["game"]["user"] = $settings_varname['DBUSER']["varvalue"];
     $dbConfig["game"]["pass"] = $settings_varname['DBPASS']["varvalue"];
     $dbConfig["game"]["name"] = $settings_varname['DBNAME']["varvalue"];
     $dbConfig["log"]["host"] = $settings_varname['DB_LOG_HOST']["varvalue"];
     $dbConfig["log"]["user"] = $settings_varname['DB_LOG_USER']["varvalue"];
     $dbConfig["log"]["pass"] = $settings_varname['DB_LOG_PASS']["varvalue"];
     $dbConfig["log"]["name"] = $settings_varname['DB_LOG_NAME']["varvalue"];
     $dbConfig["cross"]["host"] = $settings_varname['DB_CROSS_HOST']["varvalue"];
     $dbConfig["cross"]["user"] = $settings_varname['DB_CROSS_USER']["varvalue"];
     $dbConfig["cross"]["pass"] = $settings_varname['DB_CROSS_PASS']["varvalue"];
     $dbConfig["cross"]["name"] = $settings_varname['DB_CROSS_NAME']["varvalue"];
     $dbConfig["global_game"]["host"] = $settings_varname['DB_GLOBAL_HOST']["varvalue"];
     $dbConfig["global_game"]["user"] = $settings_varname['DB_GLOBAL_USER']["varvalue"];
     $dbConfig["global_game"]["pass"] = $settings_varname['DB_GLOBAL_PASS']["varvalue"];
     $dbConfig["global_game"]["name"] = $settings_varname['DB_GLOBAL_NAME']["varvalue"];
     TenYear::set_val('dbConfig', $dbConfig);
     $memcachedConfig = array();
     $memcachedConfig['setting']["host"] = $settings_varname['MEMCACHE_SETTING_HOST']["varvalue"];
     $memcachedConfig['setting']["port"] = $settings_varname['MEMCACHE_SETTING_PORT']["varvalue"];
     $memcachedConfig['setting']["sock"] = $settings_varname['MEMCACHE_SETTING_SOCK']["varvalue"];
     $memcachedConfig['game']['host'] = $settings_varname['MEMCACHE_GAME_HOST']["varvalue"];
     $memcachedConfig['game']['port'] = $settings_varname['MEMCACHE_GAME_PORT']["varvalue"];
     $memcachedConfig['game']["sock"] = $settings_varname['MEMCACHE_GAME_SOCK']["varvalue"];
     $memcachedConfig['cross']['host'] = $settings_varname['MEMCACHE_CROSS_HOST']["varvalue"];
     $memcachedConfig['cross']['port'] = $settings_varname['MEMCACHE_CROSS_PORT']["varvalue"];
     $memcachedConfig['cross']["sock"] = $settings_varname['MEMCACHE_CROSS_SOCK']["varvalue"];
     TenYear::set_val('memcachedConfig', $memcachedConfig);
     $mongoConfig = array();
     $mongoConfig['host'] = $settings_varname['MONGO_HOST']['varvalue'];
     $mongoConfig['port'] = $settings_varname['MONGO_PORT']['varvalue'];
     $mongoConfig['db'] = $settings_varname['MONGO_DB']['varvalue'];
     $mongoConfig['collection'] = $settings_varname['MONGO_COLLECTION']['varvalue'];
     TenYear::set_val('mongoConfig', $mongoConfig);
     $redisConfig = array();
     $redisConfig['game']['host'] = $settings_varname['REDIS_HOST']['varvalue'];
     $redisConfig['game']['port'] = $settings_varname['REDIS_PORT']['varvalue'];
     $redisConfig['game']['sock'] = $settings_varname['REDIS_SOCK']['varvalue'];
     if (isset($settings_varname['REDIS_QUEUE_HOST'])) {
         $redisConfig['queue']['host'] = $settings_varname['REDIS_QUEUE_HOST']['varvalue'];
         $redisConfig['queue']['port'] = $settings_varname['REDIS_QUEUE_PORT']['varvalue'];
         $redisConfig['queue']['sock'] = $settings_varname['REDIS_QUEUE_SOCK']['varvalue'];
     } else {
         $redisConfig['queue']['host'] = $settings_varname['REDIS_HOST']['varvalue'];
         $redisConfig['queue']['port'] = $settings_varname['REDIS_PORT']['varvalue'];
         $redisConfig['queue']['sock'] = $settings_varname['REDIS_SOCK']['varvalue'];
     }
     if (isset($settings_varname['REDIS_PLAYER_HOST'])) {
         $redisConfig['player']['host'] = $settings_varname['REDIS_PLAYER_HOST']['varvalue'];
         $redisConfig['player']['port'] = $settings_varname['REDIS_PLAYER_PORT']['varvalue'];
         $redisConfig['player']['sock'] = $settings_varname['REDIS_PLAYER_SOCK']['varvalue'];
     } else {
         $redisConfig['player']['host'] = $settings_varname['REDIS_HOST']['varvalue'];
         $redisConfig['player']['port'] = $settings_varname['REDIS_PORT']['varvalue'];
         $redisConfig['player']['sock'] = $settings_varname['REDIS_SOCK']['varvalue'];
     }
     if (isset($settings_varname['REDIS_CROSS_HOST'])) {
//.........这里部分代码省略.........
开发者ID:bluefan,项目名称:phpsource,代码行数:101,代码来源:Server.php

示例2: set_time_limit

<?php

set_time_limit(999999);
ini_set('memory_limit', '1024M');
define('UUZU_AUTH', 0);
require '../global.php';
TenYear::getInstance();
//$dbConfig["xgame_settings"]["host"] = '192.168.1.136';
//$dbConfig["xgame_settings"]["user"] = 'root';
//$dbConfig["xgame_settings"]["pass"] = '?root?';
//$dbConfig["xgame_settings"]["name"] = 'xgame_settings_2';
TenYear::set_val('dbConfig', $dbConfig);
class TestConfig extends Base
{
    protected $phpexcel_dir = "/Plugins/";
    protected $letters = array('', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');
    public function __construct()
    {
        if (!is_dir($this->phpexcel_dir)) {
            $this->phpexcel_dir = DATA_PATH . "/Plugins/";
        }
        $a = $_GET["a"];
        if (!empty($a)) {
            if (method_exists($this, $a)) {
                $this->{$a}();
            } else {
                $this->error("参数错误");
            }
        }
    }
    public function get_cell_name($row = 1, $col = 1)
开发者ID:bluefan,项目名称:phpsource,代码行数:31,代码来源:tool_xgame_settings_bl.php


注:本文中的TenYear::set_val方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。