composer常常出错
可以尝试下面几个切换后的再试试

composer config -g repo.packagist composer https://repo.packagist.org
composer config -g repo.packagist composer https://packagist.phpcomposer.com

// 阿里云 Composer 镜像
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
// 腾讯云 Composer 镜像
composer config -g repo.packagist composer https://mirrors.cloud.tencent.com/composer/
// PHP 国内 Composer 镜像
composer config -g repo.packagist composer https://packagist.phpcomposer.com
// 华为云 Composer 镜像
composer config -g repo.packagist composer https://repo.huaweicloud.com/repository/php/
// php.cnpkg.org Composer 镜像
composer config -g repo.packagist composer https://php.cnpkg.org

composer 使用代理

export https_proxy='192.168.0.1:7890'
export http_proxy='192.168.0.1:7890'

mysqldump导出数据
Windows环境下

创建 online_db.cnf 配置文件

[client]
host=127.0.0.1
port=3306
user=root
password=12345
skip-lock-tables=TRUE #该配置为了备份时不锁库
ignore-table=common.courses1
ignore-table=common.bonuses_old
ignore-table=common.lives
ignore-table=common.live_powers

创建 mysql_back.bat bat文件

set t=%date:~,4%年%date:~5,2%月%date:~8,2%日星期%date:~12,2%%time:~0,2%:%time:~3,2%:%time:~6,2%
D:\server\MySQL\bin\mysqldump.exe  --defaults-extra-file="online_db.cnf" course> "bak\online_course%t%.sql"

如果需要隐藏执行的bat窗口
创建 hide12345.vbs 文件

set ws=WScript.CreateObject("WScript.Shell")
ws.Run "mysql_back.bat",0

现在执行 hide12345.vbs 即可隐藏执行备份了
执行 mysql_back.bat 即可看见备份窗口, 备份完成后自动关闭

注意mysqldump.exe填写本机的正确路径

今天无语中查了下阿里云虚拟主机的访问历史, 发现之前使用WordPress被莫名其妙的写入一堆英文的文章的原因查到了, 登录接口被暴力破解导致的, 所有时间比较急, 就写了个简单的POST请求的安全控制的代码, 使用也很简单, 直接在程序入口直接require 这个文件即可, 需要保证这个配置文件定义的限流锁文件保存路径具有写权限

可以看出, 一个登录请求了那么多次, 没办法, 紧急写了个比较粗糙的代码

<?php

// 简单的全局请求安全限制接口
class RequestLimit
{

    protected $configFilePath = 'request_limit.lock';
    protected $config = [
        'GET' => [],// 定义需要限流的类型, 如果不想写配置, 那么就默认以default配置为准
    ];
    protected $default = [
        'rate' => '10/60|20/600|30/3600|100/43200|200/86400', // 限制10次/60s, 20次/10分钟, 30次一小时
        'try_cont' => 0,
        'save_history_count' => 100, // 保留历史条数
        'try_history' => [],
    ];

    public function __construct()
    {
        if (file_exists($this->configFilePath)) {
            $this->config = json_decode(file_get_contents($this->configFilePath), true);
        }
    }

    public function handle($method)
    {
        if (!array_key_exists($method, $this->config)) {
            return;
        }
        if (empty($this->config[$method])) {
            $this->config[$method] = $this->default;
        }
        $this->config[$method]['try_history'] = empty($this->config[$method]['try_history']) ? [] : $this->config[$method]['try_history'];
        // 再次请求频率判断, 通过才让继续
        foreach (explode('|', $this->config[$method]['rate']) as $item) {
            [$x, $y] = explode('/', $item);
            if (!empty($this->config[$method]['try_history'][$x - 1]) && $this->config[$method]['try_history'][$x - 1] + $y >= time()) {
                header('HTTP/1.1 429 Too Many Requests');
                echo '429 Too Many Requests';
                exit;
            }
        }
        if (empty($this->config[$method]['save_history_count'])) {
            $this->config[$method]['save_history_count'] = 100;
        }
        array_unshift($this->config[$method]['try_history'], time());
        $this->config[$method]['try_history'] = array_slice($this->config[$method]['try_history'], 0, $this->config[$method]['save_history_count']);
        $this->config[$method]['try_cont'] = empty($this->config[$method]['try_cont']) ? 1 : $this->config[$method]['try_cont'] + 1;
        $this->saveConfig();
    }

    public function saveConfig()
    {
        file_put_contents($this->configFilePath, json_encode($this->config, 256));
    }
}

$q = new RequestLimit();
$q->handle($_SERVER['REQUEST_METHOD']);

Windows下的命令

# 删除所有路由(谨慎使用, 会导致127.0.0.1无法访问, 恢复后依然需要一段时间才能后遗症自动修复)
route -p delete *

# 修复链路(执行后需要重启)
netsh int ipv4 reset

// 链路设置(虽然设置成功了, 不知道怎么才有意义)
route -p add 192.168.0.117 mask 255.255.255.255 192.168.0.1 metric 5 if 2

查询当前链路情况
route print -4

跟踪访问的地址走的路径
tracert 192.168.5.11

先打开cmd

输入下面的命令回车

netsh wlan show profiles

显示如下

C:\Users\Administrator>netsh wlan show profiles

接口 WLAN 上的配置文件:


组策略配置文件(只读)
---------------------------------
    <无>

用户配置文件
-------------
    所有用户配置文件 : TP-LINK_CC04
    所有用户配置文件 : Tenda_931358
    所有用户配置文件 : Honor9
    所有用户配置文件 : changyi
    所有用户配置文件 : DIRECT-a8-Pantum M6200 Series
    所有用户配置文件 : TPGuest_F10D

比如我们需要查询第一个WiFi的密码

netsh wlan show profiles name="TP-LINK_CC04"  key=clear

显示如下

C:\Users\Administrator>netsh wlan show profiles name="TP-LINK_CC04"  key=clear

接口 WLAN 上的配置文件 TP-LINK_CC04:
=======================================================================

已应用: 所有用户配置文件

配置文件信息
-------------------
    版本                   : 1
    类型                   : 无线局域网
    名称                   : TP-LINK_CC04
    控制选项               :
        连接模式           : 自动连接
        网络广播           : 只在网络广播时连接
        AutoSwitch         : 请勿切换到其他网络
        MAC 随机化: 禁用

连接设置
---------------------
    SSID 数目              : 1
    SSID 名称              :“TP-LINK_CC04”
    网络类型               : 结构
    无线电类型             : [ 任何无线电类型 ]
    供应商扩展名           : 不存在

安全设置
-----------------
    身份验证         : WPA2 - 个人
    密码                 : CCMP
    身份验证         : WPA2 - 个人
    密码                 : GCMP
    安全密钥               : 存在
    关键内容            : 88888888

费用设置
-------------
    费用                : 无限制
    阻塞                : 否
    接近数据限制        : 否
    过量数据限制        : 否
    漫游                : 否
    费用来源            : 默认