Typecho - 关闭评论

footer.php

<?php //$this->need('component/comments.php'); ?>

最近好多随机英文字符评论,暂时先关闭评论了,过年前再打开。

JS - 获取昨天、今天的日期

获取昨天日期

function yesterday() {
    var timenow = new Date();
    timenow.setDate(timenow.getDate() - 1); //设置天数 -1 天,昨天的日期
    var y = timenow.getFullYear();//年
    var m = timenow.getMonth() + 1;//月
    m = m < 10 ? '0' + m : m;
    var d = timenow.getDate();//日
    d = d < 10 ? ('0' + d) : d;
    var yesterdayTime = y + '/' + m + '/' + d;//yyyy/mm/dd格式
    return yesterdayTime;
}

  翻  牌  子

apache - 映射

Alias /imgSrc/ “/sdzw/ibp/upload/ptlogin/”
<Directory “/sdzw/ibp/upload/ptlogin/”>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    Order allow,deny
    Allow from all
</ Directory>

  翻  牌  子

bootstrap - alert

<style>
.alert{
    display: none;
    position: fixed;
    top: 1%;
    left: 45%;
    z-index: 999;
    border: 1px solid transparent;
    border-radius: 5px;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}
.alert-info {
    color: #31708f;
    background-color: #d9edf7;
    border-color: #bce8f1;
}
.alert-warning {
    color: #8a6b3b;
    background-color: #fcf8e3;
    border-color: #faebcc;
}
.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
</style>
<script>
/*
 * .alert-success
 * .alert-info
 * .alert-warning
 * .alert-danger
 */
function alertShow(style, message){
    $('.alert').remove();
    $('<div>').appendTo('body').addClass('alert ' + style).html(message).show();
}
function alertHidden(time){
    $('.alert').delay(time).fadeOut();
}
</script>

  翻  牌  子

MYSQL - group_concat

group_actionid 表

groupid actionid groupname
g01 a01 下路
g02 a02 中路
g01 a03 下路
g01 a02 下路

actionid 表

actionid actionname displayname
a01 aixi 寒冰射手
a02 yasuo 疾风剑豪
a03 jinkesi 暴走萝莉

  翻  牌  子

PHP - 调用 webservice 接口 - php 5.4 以下

<?php
header('Content-Type:text/html; charset=utf-8');
require_once('nusoap.php');
$ip = $_REQUEST['ip'];
$func = $_REQUEST['func'];
$param = $_REQUEST['param'];
$namespace = $_REQUEST['namespace'];
$paras = json_decode(json_encode($param), true);
try{
    $client = new soapclient('http://'.$ip.'/xx/Webservice?wsdl', true);
    $client->soap_defencoding = 'UTF-8';
    $client->decode_utf8 = false;
    $client->xml_encoding = 'UTF-8';
    $result = $client->call($func, $paras, $namespace);
    print_r($result);
}catch(SoapFault $exception){
    print_r($exception);
}
?>

  翻  牌  子