06 2020 档案
摘要:$('.required').each(function () { // 判断是否有子SPU var selected = $('#sub_spu').children('option:selected').val(); if (selected == 0) { if ($(this).hasCla
阅读全文
摘要:// 过滤重复数组 function array_uniq(input_arr) { // 判断规格是否重复 var h={}; //定义一个hash表 var arr=[]; //定义一个临时数组 for(var i = 0; i < input_arr.length; i++){ //循环遍历当
阅读全文
摘要:window.location.href='download_file?text=' + encodeURIComponent(text) + '&voice=' + voice + '&speech_rate=' + speech_rate; if (!_REQUEST
阅读全文
摘要:public function downFile(file_name) { header('Content-Description: File Transfer'); header('Content-Type: application/vnd.android.package-archi
阅读全文
摘要:先安装sdk composer require alibabacloud/sdk 需要知道 AccessKeyID,AccessKeySecret <?php /** * composer require alibabacloud/sdk * 获取阿里云相关的token */ namespace C
阅读全文
摘要:// change事件 $('input[type=radio][name=type]').change(function () { if (this.value == '1') { $('.jump-item').show(); } else if (this.value == '2' || th
阅读全文
摘要:v='aaa_111' array=(JUMP_XCX != '' ]]; then # 可以判断空字符串 和 空数组 NEW_JUMP_XCX='' for v in ${JUMP_XCX[@]};do array=(
阅读全文
摘要:JUMP_XCX=('xxx_111' 'yyy_222' 'zzz_333') if [[ {JUMP_XCX[@]};do if [[ $NEW_JUMP_XC
阅读全文
摘要:<?php header("Content-Type: text/html;charset=utf-8"); error_reporting(E_ALL | E_STRICT); host = $param_arr['h'] ?:
阅读全文
摘要:很实用,分类多了不好查询。 public function index() { if (_GET['parent_name']) { parent_name.'%']; $this->assign
阅读全文
摘要:define('BASE_PATH',str_replace('\\','/',realpath(dirname(__FILE__).'/'))."/"); 将这个代码放在入口index.php,将可以在别的地方使用到。 比如配置全局日志。 // 全局通用日志工具 function setlog($
阅读全文
摘要:# sudo composer require doctrine/instantiator <?php require 'vendor/autoload.php'; require_once 'hello.php'; // 如果不存在,将报错 // class hello { // public f
阅读全文
摘要:先备份 sudo mv /etc/apt/sources.list /etc/apt/sources.list.backup 新建 sudo vim /etc/apt/sources.list 更改为清华源 #清华源 deb https://mirrors.tuna.tsinghua.edu.cn/
阅读全文
摘要:composer require yzalis/identicon 使用 /** * 获取头像 */ public function getAvatar($uid = '') { uid) { $result
阅读全文
摘要:# 判断是否启动了Redis,仅作为提醒 REDIS_PIDS=REDIS_PIDS" = "" ]; then Echo_Yellow "Redis is not run
阅读全文
摘要:本来1 >屏幕 (1指向屏幕) 执行>log后, 1 >log (1指向log) 执行2>&1后, 2 >1 (2指向1,而1指向log,因此2也指向了log) 通常放到后面!!! cnpm install >> $all_log_file 2>&1 # 将标准错误也输出到log中 , 2>&1 意
阅读全文
摘要:InstallWhileHostsExist="" Echo_Yellow "Do you want to continue install?" read -p "Default continue,Enter your choice [Y/n]: " InstallWhileHostsExist c
阅读全文
摘要:# sqlversion.php sqlversion_file={DB_HOST}';#g" $sqlversion_file s
阅读全文
摘要:# 判断是否安装了node if ! type node >/dev/null 2>&1; then echo 'node 未安装'; else echo 'node 已安装'; fi # 判断是否安装了npm if ! type npm >/dev/null 2>&1; then Echo_Red
阅读全文
摘要:function colorize(status) { status) { case "SUCCESS": case "Green": $out = "[32m"; //Green break; case "FAILURE": case "Re
阅读全文
摘要:Color_Text() { echo -e " \e[0;1\e[0m" } Echo_Red() { echo 1" "31") } Echo_Green() { echo 1" "32") } Echo_Yellow() {
阅读全文
摘要:# nginx 初始化,父脚本中的变量会自动传入引入的脚本中 . init/nginx.sh 子脚本内容 #!/bin/bash # 生成nginx配置 # cur_dir=(dirname $(pwd)) # input_name=demo # input_do
阅读全文
摘要:1 dash中 echo 'hello\nworld' 将会输出 hello world 2 bash中 echo 'hello\nworld' 将会输出 hello\nworld 一般情况下 /bin/sh 被软链到 /bin/dash,偶尔也会遇到有人把 /bin/sh 软链到 /bin/bas
阅读全文
摘要:当前目录 cur_dir=(dirname $(pwd))
阅读全文
摘要:尾部 # 将域名写入hosts文件 echo "127.0.0.1 input_domain" /etc/hosts
阅读全文
摘要:# 判断hosts中有域名 if cat '/etc/hosts' | grep "input_domain已存在" domain_flag='' continue fi
阅读全文
摘要:正则表达式匹配域名 ^(http(s)?:\/\/)?[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+(:[0-9]{1,5})?$ 在shell中使用 read -p "请输入域名: " input_domain ech
阅读全文
摘要:基类 <?php /** * User: Eden * Date: 2019/3/21 * 共有内容 */ namespace Common\Service; use Vendor\Func\Http; class AliService extends CommonService { public
阅读全文
摘要:引入 @font-face { font-family: 'huakang'; src:url('https://cdn.caomall.net/huakang_hupin.ttf'); } 使用 .huakang { font-family: 'huakang'; } 少量使用的话,可以用字蛛压缩
阅读全文
摘要:字蛛是一个智能 WebFont 压缩工具,它能自动分析出页面使用的 WebFont 并进行按需压缩。 官网 http://font-spider.org/ github https://github.com/aui/font-spider 安装 sudo npm install font-spide
阅读全文
摘要:html <block wx:if="{{index_info.video != false}}"> <view class="tv"> <view class="head1"> <text class="one">动漫<text >说</text></text> </view> <view cla
阅读全文
摘要:html <view class="person-info"> <image class="head-img" src="/images/tmp/demo.png" /> <view class="person-detail"> <view class="user-name"> 张三 <text c
阅读全文
摘要:html <view class="item"> <view class="line-date">帮扶日期:2019-12-27</view> <view class="line-person">被帮扶人:张三</view> <view class="line-title">帮扶主题:企业爱心送温暖
阅读全文
摘要:html <form bindsubmit="formSubmit"> <view class="main"> <view class="top-title">基本信息</view> <view class="form-content"> <view class="form-item"> <view
阅读全文
摘要:选择ssl证书服务 购买免费证书 补全信息 配置域名认证(去阿里云) 等一会,等待证书签发,签发之前,订单状态为待确认 去CDN中修改配置(根据备注名选择ssl证书) 搞定了!!!
阅读全文