PHP code example of blackhilloldmonster / wechat_mini_programs_sdk_for_php
1. Go to this page and download the library: Download blackhilloldmonster/wechat_mini_programs_sdk_for_php library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
blackhilloldmonster / wechat_mini_programs_sdk_for_php example snippets
composer
#获取小程序token
use BHOM\WechatMP\Token;
$appid
$appsecret
$token_info = Token::get_token($appid,$appsecret);
//返回参数示例
[
"code"=>200,
"message"=>"成功",
"data"=>[
"access_token"=>"asdfaasdfasdfasdfasdf",
"expires_in"=>7200
]
]