摘要: $v) { $sql = 'SELECT * FROM '; $sql .= 'INFORMATION_SCHEMA.TABLES '; $sql .= 'WHERE '; $sql .= "table_name = '{$v['TABLE_NAME']}' AND table_schema = '{$database}'"; $table_result... 阅读全文
posted @ 2015-07-24 02:14 ChangCrazy 阅读(431) 评论(0) 推荐(0) 编辑
摘要: 编写shell脚本 vi /etc/init.d/nginx 添加权限 注册服务 测试启动 约定目录 /usr/local/php/sbin/php-fpm/usr/local/php/etc/php-fpm.conf/usr/local/php/etc/php.ini 启动,测试 #测试php-f 阅读全文
posted @ 2015-07-24 02:09 ChangCrazy 阅读(328) 评论(0) 推荐(0) 编辑
摘要: 创建数据库CREATE DATABASE IF NOT EXISTS $database DEFAULT CHARSET utf8 COLLATE utf8_general_ci;CREATE DATABASE $database DEFAULT CHARACTER SET utf8 COLLATE... 阅读全文
posted @ 2015-07-24 02:01 ChangCrazy 阅读(120) 评论(0) 推荐(0) 编辑
摘要: $count = 1000;for($i=0;$i $test_array[$j+1]){ $tmp = $test_array[$j]; $test_array[$j] = $test_array[$j+1]; $test_arra... 阅读全文
posted @ 2015-07-24 01:39 ChangCrazy 阅读(145) 评论(0) 推荐(0) 编辑
摘要: npm:http://npm.taobao.org/系统镜像文件:http://mirrors.163.com/http://mirrors.aliyun.com/http://backup.mirrors.ustc.edu.cn/cdn:http://cdn.code.baidu.com/http... 阅读全文
posted @ 2015-07-24 00:59 ChangCrazy 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 将以下代码保存为php-fpm,修改路径为自己的路径(有php.ini的)#!/bin/bash## Startup script for the PHP-FPM server.## chkconfig: 345 85 15# description: PHP is an HTML-embedded... 阅读全文
posted @ 2015-07-24 00:51 ChangCrazy 阅读(300) 评论(0) 推荐(0) 编辑
摘要: webbench最多可以模拟3w多个并发请求去测试网站负载能力。一:获取webbench工具,安装编译:wget http://blog.zyan.cc/soft/linux/webbench/webbench-1.5.tar.gztar zxvf webbench-1.5.tar.gzcd web... 阅读全文
posted @ 2015-07-17 16:21 ChangCrazy 阅读(194) 评论(0) 推荐(0) 编辑
摘要: 方法一:各个快递公司的API第三方整合接口快递查询接口:function kuaidi100_scan($getcom,$invoice_sn) { switch ($getcom){ case "EMS": $postcom = 'ems'; break; case "中国邮政":... 阅读全文
posted @ 2015-07-17 15:44 ChangCrazy 阅读(520) 评论(0) 推荐(0) 编辑
摘要: 方式一: /etc/init.d/servicename restart 编写/etc/init.d/ 下面的标准的服务shell脚本方式二: vim /etc/rc.local /home/memcached/bin/memcached -d -m 200 -u root -l 192.16... 阅读全文
posted @ 2015-07-15 19:16 ChangCrazy 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 'filecache'=>array( 'class'=>'system.caching.CFileCache', 'directoryLevel'=>'3',),//在main.php 配置memcache'memcache'=>array( 'class'=>'syst... 阅读全文
posted @ 2015-07-08 21:13 ChangCrazy 阅读(270) 评论(0) 推荐(0) 编辑