将txt文件全部移入runtime

master
chenzhi 5 years ago
parent 9104c0865c
commit 86db958ca7

@ -2925,9 +2925,9 @@ class ExportController extends Controller
array('mau','MAU'),
);
if (is_file(dirname(__FILE__).'/access_data_user.txt')) {
if (is_file(RUNTIME_PATH.'/access_data_user.txt')) {
$filetxt = file_get_contents(dirname(__FILE__).'/access_data_user.txt');
$filetxt = file_get_contents(RUNTIME_PATH.'/access_data_user.txt');
$data = json_decode($filetxt,true);
@ -2983,9 +2983,9 @@ class ExportController extends Controller
array('ltv30','LTV30'),
);
if (is_file(dirname(__FILE__).'/access_data_ltv.txt')) {
if (is_file(RUNTIME_PATH.'/access_data_ltv.txt')) {
$filetxt = file_get_contents(dirname(__FILE__).'/access_data_ltv.txt');
$filetxt = file_get_contents(RUNTIME_PATH.'/access_data_ltv.txt');
$data = json_decode($filetxt,true);
@ -3029,9 +3029,9 @@ class ExportController extends Controller
$num = I('num',2);
$key = $_REQUEST['key'];
if (is_file(dirname(__FILE__).'/access_data_foldline.txt')) {
if (is_file(RUNTIME_PATH.'/access_data_foldline.txt')) {
$filetxt = file_get_contents(dirname(__FILE__).'/access_data_foldline.txt');
$filetxt = file_get_contents(RUNTIME_PATH.'/access_data_foldline.txt');
$data = json_decode($filetxt,true);
@ -3391,9 +3391,9 @@ if ($key == 'player'){
);
}
if (is_file(dirname(__FILE__).'/device_data_foldline.txt')) {
if (is_file(RUNTIME_PATH.'/device_data_foldline.txt')) {
$filetxt = file_get_contents(dirname(__FILE__).'/device_data_foldline.txt');
$filetxt = file_get_contents(RUNTIME_PATH.'/device_data_foldline.txt');
$data = json_decode($filetxt,true);

@ -111,7 +111,7 @@ class PublicController extends \Think\Controller
{
$appid = C('wechat.appid');
$appsecret = C('wechat.appsecret');
$result = auto_get_access_token(dirname(__FILE__) . '/access_token_validity.txt');
$result = auto_get_access_token(RUNTIME_PATH . '/access_token_validity.txt');
if ($result['is_validity']) {
session('token', $result['access_token']);
$auth = new WechatAuth($appid, $appsecret, $result['access_token']);
@ -119,7 +119,7 @@ class PublicController extends \Think\Controller
$auth = new WechatAuth($appid, $appsecret);
$token = $auth->getAccessToken();
$token['expires_in_validity'] = time() + $token['expires_in'];
wite_text(json_encode($token), dirname(__FILE__) . '/access_token_validity.txt');
wite_text(json_encode($token), RUNTIME_PATH . '/access_token_validity.txt');
session('token', $token['access_token']);
}
$scene_id = sp_random_num(4) . '0';
@ -140,7 +140,7 @@ class PublicController extends \Think\Controller
$auth = new WechatAuth($appid, $appsecret);
$token = $auth->getAccessToken();
$token['expires_in_validity'] = time() + $token['expires_in'];
wite_text(json_encode($token), dirname(__FILE__) . '/access_token_validity.txt');
wite_text(json_encode($token), RUNTIME_PATH . '/access_token_validity.txt');
session('token', $token['access_token']);
$this->get_openid();
}
@ -152,13 +152,13 @@ class PublicController extends \Think\Controller
$appid = C('weixin_login.appid');
$appsecret = C('weixin_login.appsecret');
$auth = new WechatAuth($appid, $appsecret);
$result = auto_get_access_token(dirname(__FILE__) . '/qr_access_token_validity.txt');
$result = auto_get_access_token(RUNTIME_PATH . '/qr_access_token_validity.txt');
if ($result['is_validity']) {
session('token', $result['access_token']);
} else {
$token = $auth->getAccessToken();
$token['expires_in_validity'] = time() + $token['expires_in'];
wite_text(json_encode($token), dirname(__FILE__) . '/qr_access_token_validity.txt');
wite_text(json_encode($token), RUNTIME_PATH . '/qr_access_token_validity.txt');
session('token', $token['access_token']);
}
$redirect_uri = "http://" . $_SERVER['HTTP_HOST'] . "/admin.php/Public/wechat_login_callback";

@ -41,7 +41,7 @@ class StatController extends ThinkController
$data = array_slice($list,($page-1)*$row,$row,true);
file_put_contents(dirname(__FILE__).'/access_data_user.txt',json_encode($list));
file_put_contents(RUNTIME_PATH.'/access_data_user.txt',json_encode($list));
@ -95,7 +95,7 @@ class StatController extends ThinkController
$data = array_slice($list,($page-1)*$row,$row,true);
file_put_contents(dirname(__FILE__).'/access_data_user.txt',json_encode($list));
file_put_contents(RUNTIME_PATH.'/access_data_user.txt',json_encode($list));
if($count > $row){
$page = new \Think\Page($count, $row);
@ -1709,7 +1709,7 @@ class StatController extends ThinkController
$table['duplicate']['active'] = $table['sum']['active'];
}
@file_put_contents(dirname(__FILE__).'/device_data_foldline.txt',json_encode($export));
@file_put_contents(RUNTIME_PATH.'/device_data_foldline.txt',json_encode($export));
if ($flag) {

@ -224,7 +224,7 @@ class StatisticsController extends ThinkController {
}
}
file_put_contents(dirname(__FILE__).'/access_data_foldline.txt',json_encode($export));
file_put_contents(RUNTIME_PATH.'/access_data_foldline.txt',json_encode($export));
if ($flag) {
@ -976,7 +976,7 @@ if ($payids) {
$data = array_slice($list,($page-1)*$row,$row,true);
file_put_contents(dirname(__FILE__).'/access_data_ltv.txt',json_encode($list));
file_put_contents(RUNTIME_PATH.'/access_data_ltv.txt',json_encode($list));
$page = set_pagination($count,$row);

@ -559,7 +559,7 @@ class UserController extends AdminController
}
$appid = C('wechat.appid');
$appsecret = C('wechat.appsecret');
$result = auto_get_access_token(dirname(__FILE__) . '/access_token_validity.txt');
$result = auto_get_access_token(RUNTIME_PATH . '/access_token_validity.txt');
if ($result['is_validity']) {
session('token', $result['access_token']);
$auth = new WechatAuth($appid, $appsecret, $result['access_token']);
@ -567,7 +567,7 @@ class UserController extends AdminController
$auth = new WechatAuth($appid, $appsecret);
$token = $auth->getAccessToken();
$token['expires_in_validity'] = time() + $token['expires_in'];
wite_text(json_encode($token), dirname(__FILE__) . '/access_token_validity.txt');
wite_text(json_encode($token), RUNTIME_PATH . '/access_token_validity.txt');
session('token', $token['access_token']);
}
$times = date('s', time());

@ -1 +0,0 @@
{"news":[{"time":"0:00","count":6},{"time":"1:00","count":9},{"time":"2:00","count":7},{"time":"3:00","count":11},{"time":"4:00","count":16},{"time":"5:00","count":7},{"time":"6:00","count":9},{"time":"7:00","count":11},{"time":"8:00","count":14},{"time":"9:00","count":40},{"time":"10:00","count":58},{"time":"11:00","count":86},{"time":"12:00","count":41},{"time":"13:00","count":55},{"time":"14:00","count":194},{"time":"15:00","count":180},{"time":"16:00","count":121},{"time":"17:00","count":98},{"time":"18:00","count":120},{"time":"19:00","count":147},{"time":"20:00","count":146},{"time":"21:00","count":124},{"time":"22:00","count":93},{"time":"23:00","count":56}],"sum":{"news":1649,"active":8210,"player":1715,"money":226618},"active":[{"time":"0:00","count":967},{"time":"1:00","count":343},{"time":"2:00","count":176},{"time":"3:00","count":135},{"time":"4:00","count":118},{"time":"5:00","count":177},{"time":"6:00","count":465},{"time":"7:00","count":661},{"time":"8:00","count":622},{"time":"9:00","count":547},{"time":"10:00","count":480},{"time":"11:00","count":414},{"time":"12:00","count":326},{"time":"13:00","count":237},{"time":"14:00","count":354},{"time":"15:00","count":328},{"time":"16:00","count":215},{"time":"17:00","count":219},{"time":"18:00","count":256},{"time":"19:00","count":335},{"time":"20:00","count":274},{"time":"21:00","count":244},{"time":"22:00","count":197},{"time":"23:00","count":120}],"player":[{"time":"0:00","count":211},{"time":"1:00","count":84},{"time":"2:00","count":29},{"time":"3:00","count":25},{"time":"4:00","count":16},{"time":"5:00","count":24},{"time":"6:00","count":32},{"time":"7:00","count":56},{"time":"8:00","count":71},{"time":"9:00","count":66},{"time":"10:00","count":63},{"time":"11:00","count":69},{"time":"12:00","count":58},{"time":"13:00","count":62},{"time":"14:00","count":50},{"time":"15:00","count":99},{"time":"16:00","count":68},{"time":"17:00","count":61},{"time":"18:00","count":77},{"time":"19:00","count":157},{"time":"20:00","count":107},{"time":"21:00","count":101},{"time":"22:00","count":74},{"time":"23:00","count":55}],"money":[{"time":"0:00","count":"31554.00"},{"time":"1:00","count":"4117.00"},{"time":"2:00","count":"1839.00"},{"time":"3:00","count":"4513.00"},{"time":"4:00","count":"1008.00"},{"time":"5:00","count":"1981.00"},{"time":"6:00","count":"1270.00"},{"time":"7:00","count":"1906.00"},{"time":"8:00","count":"6683.00"},{"time":"9:00","count":"6119.00"},{"time":"10:00","count":"8974.00"},{"time":"11:00","count":"14147.00"},{"time":"12:00","count":"9775.00"},{"time":"13:00","count":"11908.00"},{"time":"14:00","count":"6781.00"},{"time":"15:00","count":"12626.00"},{"time":"16:00","count":"6742.00"},{"time":"17:00","count":"8303.00"},{"time":"18:00","count":"8804.00"},{"time":"19:00","count":"23476.00"},{"time":"20:00","count":"17464.00"},{"time":"21:00","count":"16899.00"},{"time":"22:00","count":"13143.00"},{"time":"23:00","count":"6586.00"}]}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
{"access_token":"ae739TcAabBazUPsDH_SWTPgpgkqMTEWoG4_dkF1z4iF6mhLxQT99BTCbqHm3b_-E-MwDhfbxcu1EFcBg6moVrpz2RpH3WE2fZAsi3QDe3OXRj45t0R832EdE61gNsnjHXTeAEACSO","expires_in":7200,"expires_in_validity":1484799529}

File diff suppressed because one or more lines are too long

@ -1 +0,0 @@
{"access_token":"jda2SxmAdo6-1W4njmho_5dRfujy0H5LVQfayhNR6GowgFvUj_Ro7evGvgAnFM2Pw0ebrDKeMXtTs_g82P5pyR0fLXUAwGUiPa1mfr2gXbd5tg6ynLq90QMYo9syC0XTDQXiAAAPCJ","expires_in":7200,"expires_in_validity":1482811765}
Loading…
Cancel
Save