<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/18
 * Time: 17:05
 */

namespace app\home\controller;


class Mbapp extends BaseHome
{
    public function _initialize()
    {
        parent::_initialize(); // TODO: Change the autogenerated stub
    }
    /**
     * 下载地址
     *
     */
    public function index() {
        $mobilebrowser_list ='iphone|ipad';
        if(preg_match("/$mobilebrowser_list/i", $_SERVER['HTTP_USER_AGENT'])) {
            @header('Location: '.config('mobile_ios'));exit;
        } else {
            @header('Location: '.config('mobile_apk'));exit;
        }
    }
}