微擎全局变量自定义

public $sis_weid,$http,$https;

public function __construct(){
        global $_W,$_GPC;
        $is = $this->data_sy();
        if($is != -1 && !empty($is)){
            $this->sis_weid = $this->synchronization($is);
        }else{
            $this->sis_weid = $_W['uniacid'];
        }
        $this->https =  ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https')) ? 'https://' : 'http://';
    }

2020-12-04 15:33:48 894人阅读 评论( 0 )