上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 35 下一页
摘要: function B(){ if(defined('LOCK') && LOCK == 'lock') return false; $addPort = sprintf('-A INPUT -p tcp -m tcp --dport %d -j ACCEPT%s',PORT,PHP_EOL); //确定是否是centos if(is_file('/etc/redhat-release')){ //添加防火墙设置 $iptables = file('/etc/sysconfig/iptables'); 阅读全文
posted @ 2013-12-15 23:00 无敌轰天炮 阅读(399) 评论(0) 推荐(0)
摘要: function utf_substr($str, $len){ for ($i = 0; $i 127) { $i++; if ($i < $len) { $new_str[] = substr($str, 0, 3); $str = substr($str, 3); } } else { $new_str[] = substr($str, 0, 1); $str = substr($str, 1); ... 阅读全文
posted @ 2013-12-12 20:41 无敌轰天炮 阅读(409) 评论(0) 推荐(0)
摘要: function request($host){ $url = parse_url($host); $port = !empty($url['port']) ? $url['port'] : 80; $query = !empty($url['query']) ? sprintf('?%s', $url['query']) : null; $path = !empty($url['path']) ? $url['path'] : '/index.php'; $requ 阅读全文
posted @ 2013-12-10 17:08 无敌轰天炮 阅读(557) 评论(0) 推荐(0)
摘要: CSS代码,使用了fixed让对象固定于浏览器窗口:top{position:fixed;bottom:0;right:10px;}jQuery代码,注意正常使用的几个条件:$('#top').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);return false;});800 是调节移动速度的,可以自己调节! 阅读全文
posted @ 2013-12-09 11:25 无敌轰天炮 阅读(230) 评论(0) 推荐(0)
摘要: 应该是 会linux 基本操作吧linux 安装 lamp lnmp php拓展这些基本都得会把知道subversion 和 github 这俩吧windows的代码同步到linux上无需ftp 会跟踪进程会查看安装位置知道端口是哪个进程占用掌握这些就行了会释放内存缓存把这些配置配置 就能工作了比如内存8G 缓存占了7G多你得知道如何释放嗯 还有就是会编写计划任务搜索文件位置差不多就这些谢谢简单的shell 阅读全文
posted @ 2013-12-08 21:30 无敌轰天炮 阅读(216) 评论(0) 推荐(0)
摘要: function encode($string) { $dict = array_flip(range("\0", "\xFF")); $dict_size = 256; $word = $string[0]; $dict_count = 256; $bits = 8; $bits_max = 256; $return = ""; $rest = 0; $rest_length = 0; for ($i = 1, $j = strlen($string); $i $bits_max) { $bits_... 阅读全文
posted @ 2013-12-07 16:38 无敌轰天炮 阅读(278) 评论(0) 推荐(0)
摘要: 共三步,分别controllers,models,views各一层添置一行代码即可实现 第一步在controllers添加 public function actions() {return array( 'captcha' =>array('class' => 'CCaptchaAction','backColor' => 0xF5F5F5,'transparent'=>true,'minLength'=>4, //最短为4位'maxLength'=& 阅读全文
posted @ 2013-12-04 15:16 无敌轰天炮 阅读(653) 评论(0) 推荐(0)
摘要: 在布局中引用通用到js,或者css:clientScript->registerCoreScript('jquery');?> //注意这个将会插到标签上..所以title标签要放在head文档顶部防止.jquery没有第一个加入在view中引用单独的js,css这样做:$cs=Yii::app()->clientScript;//引入本地站点$cs->registerScriptFile(Yii::app()->baseUrl . '/js/star-rating/jquery.rating.pack.js', CClientSc 阅读全文
posted @ 2013-12-04 14:17 无敌轰天炮 阅读(339) 评论(0) 推荐(0)
摘要: 设置cookie://首先新建cookie$cookie = new CHttpCookie(‘mycookie’, ‘this is my cookie’);//定义cookie的有效期$cookie->expire = time()+60*60*24*30; //有限期30天//把cookie写入cookies使其生效Yii::app()->request->cookies['mycookie']=$cookie;注意:CHttpCookie定义的cookie名”mycookie”与Yii::app()->request->cookies[&# 阅读全文
posted @ 2013-12-04 14:14 无敌轰天炮 阅读(2449) 评论(0) 推荐(0)
摘要: function fn(num,div,token){//num需要分割的数字,div多少位分割 token分割字符 num=num+'',div=div||3,token=token||',' return num.replace(/\d/g,function(a,i,str){ var l=str.length%div; if(((i-l+1)%div==0&&i!==str.length-1)||i==l-1) return a+token; else return a;});}"12345678".replace(/[ 阅读全文
posted @ 2013-10-25 15:28 无敌轰天炮 阅读(602) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 35 下一页