• /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    php判断手机是IOS或安卓的方法

    php属于后台运行的脚本,如果判断访问用户设备类型,需要使用 HTTP_USER_AGENT 浏览器UA字段,此字段内包括用户的系统类型,版本号,浏览器类型等。

    示例1:

    $agent = strtolower($_SERVER['HTTP_USER_AGENT']);
    if(strpos($agent, 'iphone') || strpos($agent, 'ipad')){
        echo '苹果系统';
    }elseif(strpos($agent, 'android')){
        echo '安卓系统';
    }else{
        echo '其它';
    }

    示例2:

    if(strpos($_SERVER['HTTP_USER_AGENT'], 'iPhone')||strpos($_SERVER['HTTP_USER_AGENT'], 'iPad')){
        echo 'systerm is IOS';
    }else if(strpos($_SERVER['HTTP_USER_AGENT'], 'Android')){
       echo 'systerm is Android';
    }else{
       echo 'systerm is other';
    }


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    <style>
    html{
    -webkit-filter: grayscale(100%);
    -moz-filter: grayscale(100%);
    -ms-filter: grayscale(100%);
    -o-filter: grayscale(100%);
    filter: grayscale(100%);
    filter: gray;
    }
    </style>


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    生成公钥私钥ssh-keygen -t rsa -C "Email"


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    打包成tar.gz格式压缩包

    # tar -zcvf renwolesshel.tar.gz /renwolesshel

    解压tar.gz格式压缩包

    # tar zxvf renwolesshel.tar.gz


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    二十四节气表顺口溜:春雨惊春清谷天,夏满芒夏暑相连。秋处露秋寒霜降,冬雪雪冬小大寒。


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    ipconfig /flushdns   刷新本地DNS


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    powercfg -h off ---清理C盘休眠文件


  • /headimg/20210825/s_a7c1f6b2ec5784a9914eab9a0d0665ab.jpg
    yunitongxing

    SHOW VARIABLES LIKE 'validate_password%';

    set global validate_password_length=4;

    set global validate_password_policy=0;