static function _debug($msg = '') { $argc = func_num_args(); if ($argc > 1) { $msg = func_get_args(); } elseif ($argc == 1) { $msg = func_get_arg(0); } Logger::debug($msg); }
public function media_get($media_id) { $access_token = $this->getAccessToken(); Logger::debug($access_token); $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token={$access_token}&media_id=" . $media_id; $res = $this->httpGet($url); $file_path = "media/wechat/" . date("Ymdhis") . rand(10, 99) . rand(100, 999) . rand(1000, 9999) . ".jpg"; Model_Tools_Qiniu::upload_content($res, $file_path); $url = "http://" . PtConfig::$qiniu['domain'] . "/" . $file_path; Logger::debug($url); return $url; }