Azure Linux VM에서 MySQL 성능 최적화

mysql 2016.06.16 15:21


원문: 

https://azure.microsoft.com/ko-kr/documentation/articles/virtual-machines-linux-classic-optimize-mysql/



매개 변수


기본값



optmization

innodb_buffer_pool_size없음7G
innodb_log_file_size5M512M
max_connections1005000
innodb_file_per_table01
innodb_flush_log_at_trx_commit12
innodb_log_buffer_size8M128M
query_cache_size16M0




신고
Trackback 0 : Comment 0

json 동적 사용하기

php 2016.05.31 12:31

[원문] http://fosun.tistory.com/entry/php4-php51X%EB%8C%80%EC%97%90%EC%84%9C-json-%EC%82%AC%EC%9A%A9%ED%95%98%EA%B8%B0


if (!function_exists('json_decode')) {

    function json_decode($content, $assoc=false) {
        require_once 'classes/JSON.php';
        if ($assoc) {
            $json = new Services_JSON(SERVICES_JSON_LOOSE_TYPE);
        }
        else {
            $json = new Services_JSON;
        }
        return $json->decode($content);
    }
}

if (!function_exists('json_encode')) {
    function json_encode($content) {
        require_once 'classes/JSON.php';
        $json = new Services_JSON;
        return $json->encode($content);
    }
}


JSON.tar.gz


신고
Trackback 0 : Comment 0

curl 없이 post 데이터 주고 받기

php 2016.05.31 12:27

[원문] http://stackoverflow.com/questions/8596311/how-to-make-a-post-request-without-curl


$postdata = http_build_query(
    array(
        'var1' => 'some content',
        'var2' => 'doh'
    )
);
$opts = array('http' =>
    array(
        'method'  => 'POST',
        'header'  => 'Content-type: application/x-www-form-urlencoded',
        'content' => $postdata
    )
);
$context  = stream_context_create($opts);
$result = file_get_contents('http://example.com/submit.php', false, $context);


신고
Trackback 0 : Comment 0