$url = "http://weixin.faeries-land.com/test/player.html?ask_method=json&media_id={$media_id}&Token="; } $code = new code(); $code->code_make($url, $media_id); $this->show($row, $type); } else { $code = -1; $msg = "error:You have to use wechat app to open! "; $data = "null"; api_response::api_method($type, $code, $msg, $data); } } public function show($row, $type) { $data = array('media_id' => "{$row['media_id']}", 'title' => "{$row['title']}", 'content' => "{$row['content']}", 'create_at' => "{$row['create_at']}", 'From_nickname' => "{$row['From_nickname']}", 'To_nickname' => "{$row['To_nickname']}", 'code_url' => "http://weixin.faeries-land.com/code_img/" . $row['media_id'] . ".png"); if (empty($row)) { $code = -1; $msg = "error:The info not exist! "; $data = "null"; $result = api_response::api_method($type, $code, $msg, $data); } else { $code = 0; $msg = "success!"; $result = api_response::api_method($type, $code, $msg, $data); } return $result; } } $show = new check(); $show->permission();