mwwdfl 发布的文章

public function downloadOne()
    {
        $file_name = input('file_name'); //远程地址或本地都可以
        $mime = 'application/force-download';
        header('Pragma: public'); // required
        header('Expires: 0'); // no cache
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Cache-Control: private',false);
        header('Content-Type: '.$mime);
        header('Content-Disposition: attachment; filename="'.basename($file_name).'"');
        header('Content-Transfer-Encoding: binary');
        header('Connection: close');
        readfile($file_name); // push it out
        exit();
    }

$a = Db::name('zzz_m')->field('m_id id,m_type type,m_update time,data_type')
            ->where('m_user_id',3)
            ->buildSql();
        $b = Db::name('zzz_v')->field('v_id id,v_type type,v_update time,data_type')
            ->where('v_uid',1)
            ->where('v_take_status',3)
            ->union([$a])
            ->buildSql();
        $list = Db::table($b . ' a')->order('time desc')->paginate(10,true,['page'=>1]);// $c . a是零时表名
        $list = json_decode(json_encode($list),true);
        dump($list['data']);die;

oneinstack安装的网站突然全部报502,ip访问也是,除了www(但是www不是用oneinstack装的),不管是升级nginx还是升级oneinstack都不管用,后来是删除了不用的扩展才可以的,以前的扩展多了:ixed.5.6.lin,memcache.so,memcached.so这仨,去掉了之后正常了