csjoz11

导航

2017年7月27日 #

Linux通过netstat命令查看80端口连接数的方法

摘要: 服务器上的一些统计数据: 1)统计80端口连接数 netstat -nat|grep -i “80”|wc -l 2)统计httpd协议连接数 ps -ef|grep httpd|wc -l 3)、统计已连接上的,状态为“established netstat -na|grep ESTABLISHE 阅读全文

posted @ 2017-07-27 15:00 csjoz11 阅读(3913) 评论(0) 推荐(0) 编辑

左侧自增长

摘要: <html> <body> <div style="width:980px;height:400px;margin:0 auto;border:1px solid red"> <div style="height:400px; width:200px; float:left; ">22</div> 阅读全文

posted @ 2017-07-27 11:56 csjoz11 阅读(75) 评论(0) 推荐(0) 编辑

curl

摘要: _____________获取淘宝标题 <?php header("Content-type: text/html; charset=utf-8"); $url = 'https://item.taobao.com/item.htm?spm=a219r.lm5704.14.15.Cb4K9H&id= 阅读全文

posted @ 2017-07-27 11:56 csjoz11 阅读(136) 评论(0) 推荐(0) 编辑

红包算法

摘要: /** * 红包 * @param n * @param money 单位:分 * @return **/ public static double[] redPacket(int n, double money) { // 红包结果 double[] result = new double[n]; 阅读全文

posted @ 2017-07-27 11:49 csjoz11 阅读(107) 评论(0) 推荐(0) 编辑

生成excel xls

摘要: $filename = ecs_iconv(EC_CHARSET, 'GB2312', $_LANG['guest_statistics']);header("Content-type: application/vnd.ms-excel; charset=utf-8");header("Conten 阅读全文

posted @ 2017-07-27 11:47 csjoz11 阅读(193) 评论(0) 推荐(0) 编辑

简单文件上传

摘要: /* 检查文件类型 */if ($_FILES['upfile_flash']['type'] != "application/x-shockwave-flash"){ $link[] = array('text' => $_LANG['go_back'], 'href' => 'javascrip 阅读全文

posted @ 2017-07-27 11:47 csjoz11 阅读(178) 评论(0) 推荐(0) 编辑

计时3秒后自动跳转到登录页

摘要: <script> //计时3秒后自动跳转到登录页 var i = 3; var time_out; time_out = setInterval("time()", 800); function time() { if(i == 0){ window.location.href = "/user/l 阅读全文

posted @ 2017-07-27 11:46 csjoz11 阅读(3069) 评论(0) 推荐(0) 编辑

jquery $换JQ

摘要: <script type="text/javascript"> var jq = jQuery.noConflict(); jq(document).ready(function () { jq(".btn-inquire").click(function () { jq(".btn-inquire 阅读全文

posted @ 2017-07-27 11:46 csjoz11 阅读(305) 评论(0) 推荐(0) 编辑

用于二维数组排序

摘要: function array_sort($arr, $field, $by = SORT_ASC) { foreach ($arr as $v) { $r[] = $v[$field]; } array_multisort($r, $by, $arr); return $arr; } functio 阅读全文

posted @ 2017-07-27 11:45 csjoz11 阅读(98) 评论(0) 推荐(0) 编辑

加单引号

摘要: function db_create_in($item_list, $field_name = ''){ if (empty($item_list)) { return $field_name . " IN ('') "; } else { if (!is_array($item_list)) { 阅读全文

posted @ 2017-07-27 11:45 csjoz11 阅读(128) 评论(0) 推荐(0) 编辑

URL重写

摘要: PHP code ? 1 2 3 4 5 6 RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^so\.ccvnn\.com$ [NC] RewriteCond %{REQUEST_URI} !^/web2/ RewriteRule ^ 阅读全文

posted @ 2017-07-27 11:44 csjoz11 阅读(209) 评论(0) 推荐(0) 编辑

月周日时间

摘要: __________________________ $list = array(array());//昨日时间$yesterday = intval(strtotime(date("Y-m-d")))-86400;//本周时间$week = mktime(0, 0 , 0,date("m"),da 阅读全文

posted @ 2017-07-27 11:44 csjoz11 阅读(143) 评论(0) 推荐(0) 编辑

定时任务

摘要: 使用不同账户,执行执行脚本时候sudo经常会碰到 sudo: sorry, you must have a tty to run sudo这个情况,其实修改一下sudo的配置就好了 vi /etc/sudoers (最好用visudo命令) 注释掉 Default requiretty 一行 #De 阅读全文

posted @ 2017-07-27 11:43 csjoz11 阅读(210) 评论(0) 推荐(0) 编辑

微信

摘要: ——————————微信公从号授权 $code = input('code'); if($code != ''){ $url = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=".config('appid')."&secret=" 阅读全文

posted @ 2017-07-27 11:42 csjoz11 阅读(107) 评论(0) 推荐(0) 编辑

文件处理类

摘要: <?php/** * Tiny - A PHP Framework For Web Artisans * @author Tiny <tinylofty@gmail.com> * @copyright Copyright(c) 2010-2014 http://www.tinyrise.com Al 阅读全文

posted @ 2017-07-27 11:41 csjoz11 阅读(113) 评论(0) 推荐(0) 编辑

序列号

摘要: VMware Workstation 12序列号: 5A02H-AU243-TZJ49-GTC7K-3C61N 阅读全文

posted @ 2017-07-27 11:40 csjoz11 阅读(97) 评论(0) 推荐(0) 编辑

idea

摘要: 修改快捷键 appearance & behavior keymap Quick Definition 查看方法ctrl+shift+i comment with line comment ctrl+q 注释 comment with block comment ctrl+shift+q 注释 cl 阅读全文

posted @ 2017-07-27 11:40 csjoz11 阅读(109) 评论(0) 推荐(0) 编辑

linux命令

摘要: _____________________设置IP vi /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:0: TYPE=Tthernet UUID=486cb8fd-7e13-4fce-80c3-ccffc76d00a 阅读全文

posted @ 2017-07-27 11:39 csjoz11 阅读(115) 评论(0) 推荐(0) 编辑

nginx 配置

摘要: _____________________________________________________设权限 sudo chmod -R 777 admin _____________________________________________________定时crontab -e */1 阅读全文

posted @ 2017-07-27 11:38 csjoz11 阅读(128) 评论(0) 推荐(0) 编辑

sublime2注册码

摘要: BEGIN LICENSE Andrew Weber Single User License EA7E-855605 813A03DD 5E4AD9E6 6C0EEB94 BC99798F 942194A6 02396E98 E62C9979 4BB979FE 91424C9D A45400BF F 阅读全文

posted @ 2017-07-27 11:33 csjoz11 阅读(158) 评论(0) 推荐(0) 编辑