PHP code example of fangjia / miniapps

1. Go to this page and download the library: Download fangjia/miniapps 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/ */

    

fangjia / miniapps example snippets


   $redirect_uri = str_replace('$APPID$', $appId, $this->redirect_uri);
   $component_appid = CurrencyModel::APPID;``
   return "https://mp.weixin.qq.com/safe/bindcomponent?action=bindcomponent&no_scan=1&component_appid={$component_appid}&pre_auth_code={$this->_pre_auth_code}&redirect_uri={$redirect_uri}&auth_type=2&biz_appid={$appId}";