define.php 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?php
  2. define('TIMEZONE', "PRC"); // 时区设置
  3. date_default_timezone_set(TIMEZONE);
  4. define('DBHOST', '127.0.0.1'); // 数据库地址
  5. define('DBUSER', 'chatroom'); // 数据库用户名
  6. define('DBPORT', 3306);
  7. define('DBPASSWORD', 'lmj3503791673'); // 数据库密码
  8. define('DBNAME', 'chatroom'); // 默认数据库
  9. define('DBCHARSET', 'utf8'); // 数据库字符集
  10. #wechat defaine
  11. define('WECHAT_APPID', 'wx6a7abf227bcd0d56');
  12. define('WECHAT_KEY', '13084de8fbb0038feeaa15c3d6b392e7');
  13. define('WECHAT_SCOPE_BASE', 'snsapi_base'); // 不弹框
  14. define('WECHAT_SCOPE', 'snsapi_userinfo'); // 弹框
  15. define('WECHAT_SERVER', 'https://open.weixin.qq.com/connect/oauth2/authorize');
  16. define('WECHAT_REDIRECT_URL', urlencode('localhost'));
  17. define('WECHAT_ACCESSTOKEN_URL', 'https://api.weixin.qq.com/sns/oauth2/access_token');
  18. #log dir
  19. define('DIR_SEPARATOR', "/");
  20. define('LINUX_LOGDIRS', dirname(dirname(__FILE__)) . '/log/'); // 日志目录
  21. define('WINDOWS_LOGDIRS', dirname(dirname(__FILE__)) . '/log/error.txt'); // 日志目录
  22. define('LOGDIRS_FILENAME', 'error.log'); // 日志目录
  23. define("LOG_SERVER_URL", dirname(dirname(__FILE__)) . "/log/");
  24. #gift code status
  25. define('GIFTCODE_STATUS', 0); // 正常
  26. define('GIFTCODE_EXPIRED_STATUS', 1); //过期
  27. #log url
  28. # class dir
  29. define('LIBDIR', dirname(__FILE__) . '/'); // lib
  30. define('LIBDIR_TWO', dirname(dirname(__FILE__)) . '/mode/'); // mode
  31. #Redis
  32. define('REDIS_HOST', 'd2444656u3.zicp.vip');
  33. define('REDIS_PORT', '6379');
  34. define('REDIS_AUTH', '123456');
  35. # time format
  36. define('DATE_FORMAT_S', "Y-m-d H:i:s");
  37. define('DATE_FORMAT_D', "Y-m-d");
  38. # res
  39. #file upload url
  40. //define('RES_URL', 'http://192.168.181.133:9095');
  41. //define('RES_PATH', dirname(dirname(dirname($_SERVER['DOCUMENT_ROOT']))) . '/res/config/');
  42. //define('RES_CONFIG_URL', 'https://d.djsh5.com');// config file url
  43. define('RES_CONFIG_URL', 'http://d.djsh5.com');
  44. //define('RES_FILE_URL','/home/projects/res/config');
  45. #排行榜接口地址
  46. define('STAT_RANKING_DIR', 'http://event.djsh5.com/rank/?');
  47. # 常数zero
  48. define('ZERO', 0);
  49. define('ONE', 1);
  50. define('TWO', 2);
  51. define('THREE', 3);
  52. define('FIVE', 5);
  53. define('SIX', 6);
  54. define('HUNDRED', 100);
  55. #activites
  56. define('ACTIVITES_STATUS', 1); // 0 未开启 1 已开启
  57. #error info
  58. define('SUCCESS', 1);
  59. define('FAILURE', -1);
  60. #swoole
  61. define('SWOOLE_SER_HOST', '0.0.0.0');
  62. define('SWOOLE_SER_PORT', 9501);
  63. # css and js dir
  64. define('CSS_DIR', dirname(dirname(__FILE__)) . '/res/css/'); // css
  65. define('JS_DIR', dirname(dirname(__FILE__)) . '/res/js/'); // js