diff --git a/Application/Home/Controller/HomeController.class.php b/Application/Home/Controller/HomeController.class.php index 0c8145339..aaed98006 100644 --- a/Application/Home/Controller/HomeController.class.php +++ b/Application/Home/Controller/HomeController.class.php @@ -42,7 +42,13 @@ class HomeController extends Controller $secret = 'd3219c70a45c5e1954be4608b288d38b'; $tokenUrl = 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=' . $appid . '&secret=' . $secret; - $content = file_get_contents(RUNTIME_PATH . 'Data/wechat_ticket'); + $tempDataDir = RUNTIME_PATH . 'Data'; + if(!is_dir($tempDataDir)) { + @mkdir($tempDataDir); + } + + $content = file_get_contents($tempDataDir . '/wechat_ticket'); + $ticketData = null; if ($content) { $ticketData = json_decode($content, true);