This commit is contained in:
wangmingqing 2023-05-30 15:34:22 +08:00
parent fa4f578469
commit 811b747b5a
3 changed files with 49 additions and 46 deletions

View File

@ -58,6 +58,7 @@ elseif($_SERVER['HTTP_HOST']=="weapp.wemediacn.net" || !empty($_SERVER['SCRIPT_F
} }
//如果是正式环境 //如果是正式环境
else{ else{
echo 1232132132132132131232131;die;
//日志前缀 //日志前缀
define("TIFFANY_API_REDIS_LOG_PREFIX", "tiffany/api/"); define("TIFFANY_API_REDIS_LOG_PREFIX", "tiffany/api/");

View File

@ -12,53 +12,53 @@ if(!empty($_SERVER['REQUEST_URI'])&& (preg_match("@\/d\/@", strtolower($_SERVER[
) )
); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/oauth2/code", "/smsoauth2_qa/api/oauth2/code",
// array( array(
// "controller" => 'oauth2' , "controller" => 'oauth2' ,
// "action" => 'code', "action" => 'code',
// ) )
// ); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/oauth2/accesstoken", "/smsoauth2_qa/api/oauth2/accesstoken",
// array( array(
// "controller" => 'oauth2' , "controller" => 'oauth2' ,
// "action" => 'accesstoken', "action" => 'accesstoken',
// ) )
// ); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/sms/send", "/smsoauth2_qa/api/sms/send",
// array( array(
// "controller" => 'sms' , "controller" => 'sms' ,
// "action" => 'send', "action" => 'send',
// ) )
// ); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/sms/authcode", "/smsoauth2_qa/api/sms/authcode",
// array( array(
// "controller" => 'sms' , "controller" => 'sms' ,
// "action" => 'authcode', "action" => 'authcode',
// ) )
// ); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/sms/query_reports", "/smsoauth2_qa/api/sms/query_reports",
// array( array(
// "controller" => 'sms' , "controller" => 'sms' ,
// "action" => 'query_reports', "action" => 'query_reports',
// ) )
// ); );
// $router->add( $router->add(
// "/smsoauth2_qa/api/urls/shorturl", "/smsoauth2_qa/api/urls/shorturl",
// array( array(
// "controller" => 'urls' , "controller" => 'urls' ,
// "action" => 'shorturl', "action" => 'shorturl',
// ) )
// ); );
// print_r($router);die; // print_r($router);die;

View File

@ -167,13 +167,15 @@ $di->set('redis', function ()
preg_match("@we-shorturl\.wemediacn@", strtolower($_SERVER['HTTP_HOST'])) preg_match("@we-shorturl\.wemediacn@", strtolower($_SERVER['HTTP_HOST']))
) )
{ {
$redisObj->connect('r-bp11564d96842414128.redis.rds.aliyuncs.com', 6379); echo 111113434;die;
$redisObj->auth('3Nsb4Pmsl9bcLs24mL12l'); // $redisObj->connect('r-bp11564d96842414128.redis.rds.aliyuncs.com', 6379);
// $redisObj->auth('3Nsb4Pmsl9bcLs24mL12l');
} elseif ($_SERVER['HTTP_HOST'] == '127.0.0.1'){ //本地环境 } elseif ($_SERVER['HTTP_HOST'] == '127.0.0.1'){ //本地环境
$redisObj->connect('mysql5.weu.me', 6379); $redisObj->connect('mysql5.weu.me', 6379);
} else{ } else{
$redisObj->connect('r-bp1i8kwmlrnp6hhrkf.redis.rds.aliyuncs.com', 6379); echo 22222243434;die;
$redisObj->auth('r-bp1i8kwmlrnp6hhrkf'); // $redisObj->connect('r-bp1i8kwmlrnp6hhrkf.redis.rds.aliyuncs.com', 6379);
// $redisObj->auth('r-bp1i8kwmlrnp6hhrkf');
} }
$redisObj->select(REDIS_DB_NUMBER); $redisObj->select(REDIS_DB_NUMBER);