PageRenderTime 56ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/rxwandc/application/stat.rxwan.com/daemon/daemon/common.inc.php

https://bitbucket.org/i1598/caiyun_stat
PHP | 75 lines | 63 code | 7 blank | 5 comment | 0 complexity | 7e536f7922aa81484de65d9f140d989c MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. include(PATH_ROOT.'lib/functions.inc.php');
  3. include(PATH_ROOT.'lib/httpsqs.php');
  4. //数据库配置
  5. $cfg_db = array(
  6. 'stat2'=>array(
  7. 'driver'=>'mysql',
  8. 'host'=>'stat2.db.caiyun.com',
  9. 'port'=>'3307',
  10. 'username'=>'root',
  11. 'password'=>'10dbce2394324d',
  12. 'dbname'=>'install2',
  13. 'charset'=>'utf8'
  14. ),
  15. 'alliance'=>array(
  16. 'driver'=>'mysql',
  17. 'host'=>'alliance.db.caiyun.com',
  18. 'port'=>'3302',
  19. 'username'=>'root',
  20. 'password'=>'10dbce2394324c',
  21. 'dbname'=>'alliance',
  22. 'charset'=>'utf8'
  23. )
  24. );
  25. //HTTPSQS配置
  26. $cfg_httpsqs = array(
  27. 'host' => 'queue.memdb.caiyun.com',
  28. 'port' => 20001,
  29. 'charset' => 'UTF-8',
  30. 'active' => 'active',
  31. 'active2'=>'active2',
  32. 'install'=>'install',
  33. 'install2'=>'install2',
  34. 'uninstall'=>'uninstall',
  35. 'uninstall2'=>'uninstall2',
  36. "server2"=>"server2",
  37. "sem"=>"sem",
  38. "tb"=>"tb"
  39. );
  40. //缓存配置
  41. $cfg_cache = array(
  42. 'default'=>array(
  43. 'driver'=>'memcache',
  44. 'host'=>'large.memdb.caiyun.com',
  45. 'port'=>11311,
  46. 'prefix'=>'',
  47. 'expire'=>0
  48. ),
  49. 'large'=>array(
  50. 'driver'=>'memcache',
  51. 'host'=>'large.memdb.caiyun.com',
  52. 'port'=>11311,
  53. 'prefix'=>'',
  54. 'expire'=>0
  55. )
  56. );
  57. //定义联盟表以及数据库
  58. define('TABLE_ALLIANCE_MEMBER', 'member');
  59. define('DB_ALLIANCE','alliance');
  60. define('DB_DOWNLOAD','download');//定义download数据库
  61. //配置日志文件
  62. define('LOG_ACTIVE','active.log');
  63. define('LOG_INSTALL','install.log');
  64. define('LOG_UNINSTALL','uninstall.log');
  65. define('TIME',time ());
  66. foreach($cfg_db as $k=>$cfg_db_one){
  67. $cfg_db[$k]['link'] = dblink($k);
  68. }