예제 #1
0
 public function getAccessToken()
 {
     $code = I('get.code');
     Vendor('Wx.Wx', '', '.class.php');
     $Wx = new Wx();
     if ($code) {
         $result = $Wx->AccessToken($code);
         var_dump($result);
         exit;
     } else {
         $redirect_uri = 'http://www.iaddi.com/Wx/getAccessToken';
         $Wx->AuthorizationCode($redirect_uri, '0');
     }
 }
예제 #2
0
파일: wx.php 프로젝트: AlusaChen/wxtest
 public static function curl()
 {
     if (!self::$curl) {
         self::$curl = new Curl();
     }
     return self::$curl;
 }
예제 #3
0
파일: test.php 프로젝트: AlusaChen/wxtest
echo '<pre>';
print_r($ret);
echo '</pre>';
*/
//upload media
/*
$media_info = [
    'path' => '/Users/alusa/Downloads/1.jpg',
    'type' => 'image/jpg'
];
$ret = Wx::upload_media($media_info);
debug($ret);
*/
/*
$mid = 'N6zwTj8N5YoMUQPw6C31uMGzSgi23PKermSAEqd4scV8H7_iIMp5AX0EeZ2RinRV';
$ret = Wx::get_media($mid);
debug($ret);

$ret = Wx::add_material();
debug($ret);
*/
/*
$ret = Wx::add_material();
debug($ret);

$ret = Wx::create_group();
debug($ret);
*/
$openid = 'ogY7UjteXzwqF39bascYoX2vodsM';
$ret = Wx::send_tpl_message($openid);
debug($ret);
예제 #4
0
파일: CiWx.php 프로젝트: johnlion/hlsc
 public function __construct()
 {
     parent::__construct();
 }