摘要: Preferences >settings user 阅读全文
posted @ 2016-09-07 17:05 Adtuu 阅读(185) 评论(0) 推荐(0) 编辑
摘要: |||$value){$this->stopattack($key,$value,$this->getfilter);} foreach($_POST as $key=>$value){$this->stopattack($key,$value,$this->postfilter);} foreach($_COOKIE as $key=>$value){$this... 阅读全文
posted @ 2016-09-06 09:54 Adtuu 阅读(2568) 评论(0) 推荐(0) 编辑
摘要: 一、安装Nginx最新版 首先查看是否有安装源包 yum list nginx (或yum info nginx) 如果没有则 添加好源后继续安装 未完待续。。。 阅读全文
posted @ 2016-08-18 17:54 Adtuu 阅读(191) 评论(0) 推荐(0) 编辑
摘要: A、关闭selinux(可以预防nginx修改根目录后访问出现404或者403) vi /etc/selinux/config SELINUX=disabled B、修改打开最大文件数句柄也就是 socket数 vi /etc/security/limits.conf 添加 * soft nofile 65535 * ... 阅读全文
posted @ 2016-08-18 17:40 Adtuu 阅读(221) 评论(0) 推荐(0) 编辑
摘要: // 如果需要用图片处理功能那么就用图片数据中心域名,且需要在bucket里面设置开启图片服务 // oss-cn-hongkong.aliyuncs.com $endpoint = "img-cn-hongkong.aliyuncs.com"; try { $ossClient = new OssClient($accessKeyId, $accessKeySec... 阅读全文
posted @ 2016-07-11 10:26 Adtuu 阅读(4567) 评论(0) 推荐(0) 编辑
摘要: 一、vsftp安装篇 # 安装vsftpd yum -y install vsftpd # 启动 service vsftpd start # 开启启动 chkconfig vsftpd on # 如果启动失败那么查看端口占用情况 netstat -natp |grep 21 #显示的是被pure-f... 阅读全文
posted @ 2016-06-13 12:07 Adtuu 阅读(153) 评论(0) 推荐(0) 编辑
摘要: /** * 分单算法 * @param $size * @param $order_money * @return array */ static function splitting_order($order_money, $size = 500) { if (0 != $order_money % $size)... 阅读全文
posted @ 2016-06-01 14:21 Adtuu 阅读(498) 评论(0) 推荐(0) 编辑
摘要: Linux下 service crond restart */10 * * * * /home/mysqlbackup.sh >/home/runssh.log backup.sh #bin/bash source ~/.bash_profile LANG=en_US.UTF-8 cd /home/backup/gch Now=$(date +"%Y%m%d%H%M%S") File=b... 阅读全文
posted @ 2016-06-01 14:20 Adtuu 阅读(270) 评论(0) 推荐(0) 编辑
摘要: centos查看端口是否已开放/etc/init.d/iptables status centos开放端口/sbin/iptables -I INPUT -p tcp --dport 8000 -j ACCEPT/etc/rc.d/init.d/iptables save/etc/rc.d/init 阅读全文
posted @ 2016-04-13 11:55 Adtuu 阅读(338) 评论(0) 推荐(0) 编辑
摘要: centos svn服务器搭建 1、yum install subversion 2、mkdir -p /opt/svn 3、chmod R 777 /opt/svn 4、svnadmin create /opt/svn/repos #创建一个svn版本仓库repos 5、cd /opt/svn/repos/conf 6、cp -p svnserve.conf ./svnserve.conf... 阅读全文
posted @ 2016-03-30 18:20 Adtuu 阅读(211) 评论(0) 推荐(0) 编辑
摘要: shell.sh#!/bin/sh source ~/.bash_profile LANG=en_US.UTF-8 cd /opt/web/hzcms/ svn up >> /opt/web/svn.logcontab -e */1 * * * * /opt/web/hzcms_shell.sh > /opt/web/svn.log 阅读全文
posted @ 2016-03-30 18:19 Adtuu 阅读(678) 评论(1) 推荐(0) 编辑
摘要: centos下安装php环境 安装apache yum install httpd-devel 启动apache /etc/init.d/httpd start 安装mysql yum install mysql mysql-server 启动mysql /etc/init.d/mysqld sta 阅读全文
posted @ 2016-02-24 16:17 Adtuu 阅读(374) 评论(0) 推荐(0) 编辑
摘要: <?php // 测试文件demo.php $badword = array( '张三','张三丰','张三丰田' ); // array_combine() 函数通过合并两个数组来创建一个新数组,其中的一个数组是键名,另一个数组的值为键值。如果其中一个数组为空,或者两个数组的元素个数不同,则该函数 阅读全文
posted @ 2016-02-24 16:16 Adtuu 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 用户名:aaa 注册秘钥:2GQrt5XHYY7SBK/4b22Gm4Dh8alaR0/0k3gEN5h7FkVPIn8oG3uphlOeytIajx 注册用户名:www.yuanxingku.com 注册码:PQruG12e+333XUOJaBnFcU6SEbQzGU703UWvZ+NG2qDUV 阅读全文
posted @ 2016-02-24 16:15 Adtuu 阅读(314) 评论(0) 推荐(0) 编辑
摘要: var title = 'blog'; (function(title){ $.post(url, {}, function(data){ alert(title);//output single's blog, 我们期望的是输出 blog }) }(title)) title = "single' 阅读全文
posted @ 2016-02-24 16:14 Adtuu 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 据说是来自六间房的面试题,看了下也就是PHP的一些基础函数使用。如果是真的,说明六间房的面试官还比较仁慈,呵呵。看题吧 第一题:读取一个文件,将其Base64编码,每76个字符加一个换行 echo chunk_split(base64_encode(file_get_contents('file.t 阅读全文
posted @ 2016-02-24 16:13 Adtuu 阅读(336) 评论(0) 推荐(0) 编辑
摘要: <!--?php 02 /* 03 * 经典的概率算法, 04 * $proArr是一个预先设置的数组, 05 * 假设数组为:array(100,200,300,400), 06 * 开始是从1,1000 这个概率范围内筛选第一个数是否在他的出现概率范围之内, 07 * 如果不在,则将概率空间,也 阅读全文
posted @ 2016-02-24 16:12 Adtuu 阅读(831) 评论(0) 推荐(0) 编辑
摘要: 生成zip文件官方网站:http://www.phpconcept.net/pclzip/ 用法一: 1 <?php 2 include_once('pclzip.lib.php'); 3 $archive = new PclZip('archive.zip'); 4 $v_list = $arch 阅读全文
posted @ 2016-02-24 16:11 Adtuu 阅读(360) 评论(0) 推荐(0) 编辑
摘要: 第一种方法: 1.创建脚本文件 cat phplog.sh 2.编辑脚本内容 #!/bin/bash while : ;do /home/scripts.sh 2>/dev/null & sleep 1 done 注意:第一次运行时请不要使用bash phplog.sh & 这种后台运行的方式,它会 阅读全文
posted @ 2016-02-24 16:11 Adtuu 阅读(7753) 评论(0) 推荐(0) 编辑
摘要: Redis主从设定 一、redis安装 $ wget http://download.redis.io/releases/redis-2.8.17.tar.gz $ tar xzf redis-2.8.17.tar.gz $ cd redis-2.8.17 $ make 二、redis启动 $cd 阅读全文
posted @ 2016-02-24 16:10 Adtuu 阅读(243) 评论(0) 推荐(0) 编辑