代码改变世界

随笔档案-2013年03月

js jquery 判断当前窗口的激活点

2013-03-20 17:53 by freefei, 972 阅读, 收藏, 编辑
摘要: [js]var CurrentActive;window.onfocus = function() { CurrentActive = true; document.body.innerHTML +="当前窗口被激活";}window.onblur = function() { CurrentActive = false; document.... 阅读全文

thinkphp 生成静态页面设置

2013-03-18 17:34 by freefei, 334 阅读, 收藏, 编辑
摘要: $this->buildHtml('index',HTML_PATH.'/','index2','utf8');//注意:这里的utf8不能写成utf-8参数分别为 生成文件名称,路径,模版名称,字符集 特别主页 要配置1、在入口文件index.php文件中定义生成静态页面的文件位置 define('HTML_PATH','./htm');2、在根目录的config文件夹中的config.p... 阅读全文

性能优化之 缓存 压缩配置

2013-03-13 10:11 by freefei, 193 阅读, 收藏, 编辑
摘要: apache 服务器开启 浏览器缓存 和html css 压缩配置[php]ExpiresActive OnExpiresDefault A600ExpiresByType image/x-icon A2592000ExpiresByType application/x-javascript A2592000ExpiresByType text/css A604800ExpiresByType i... 阅读全文

widget 传参数问题

2013-03-04 17:57 by freefei, 238 阅读, 收藏, 编辑
摘要: [php]class ChoiceUserWidget extends Widget{ public function render($data){ $s['num']=$data[0]; $s['key']=$data[1]; $content = $this->renderFile('select_user',$s); return $content; } }... 阅读全文
@ https://github.com/ranmufei
点击右上角即可分享
微信分享提示