- 昵称:51助手
- 博龄:6年6个月4天
- 粉丝:122
- 关注:108
- +关注
搜索
文章分类
博客档案
php动态压缩js类库javascriptPacker
摘要:php-uglifyjs-master.zip// tp5引用JavascriptPacker类库//$buffer 为需要打包的js代码\think\Loader::import('.JavascriptPacker'); $jav = new \GK\javascriptPacker($b
判断搜索引擎蜘蛛访问网站时执行代码
摘要:在给网站杀毒时发现这串代码,意思是判断是搜索引擎来访问我们网站时,跳转到指定的网站去<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu"
鼠标经过触发动画
摘要:需要引入animate.min.css 这款动画css或者也可以直接使用七牛静态库的地址。<link href="http://cdn.staticfile.org/animate.css/3.5.2/animate.min.css" rel="stylesheet" />注意需要加上 animated 类
php数组按指定元素分组
摘要:/*数组按指定元素key值分组 * @param $dataArr array 原二组数组 * @param $keyStr string 指定元素key值 * @return array */ public function d
tp5查询结果key值等于指定字段值
摘要:链式操作的column方法column('要查询的字段','key等指定的字段')例:字段name值等于key值$nav = Db::name('nav')->order('sort asc')->column('*','name');
php正则表单式中括号()与$的应用
摘要:php正则表单式用括号"()"包含起来的部份内容等于匹配到的内容,赋值给变量$1、$2、$3....第一个()匹配到的内容,等于$1以此类推举例:要向的html代码中div标签添加一个内容$htmlCode = '<div>我的代码:</div>';$addC
tp5 runtime/temp文件夹下临时文件命名规则
摘要:在thinkphp核心文件中/thinkphp/library/think/Template.php 178行$cacheFile = $this->config['cache_path'] . $this->config['cache_prefix'] 
php 压缩css、js方法
摘要:压缩cssfunction compress_css($buffer) { /* remove comments */ $buffer = preg_replace("!/\*[^*]*\*+([^/][^*]*\*
php str_replace 只替换一次
摘要:自定义函数/** * 字符串只替换一次 * @param string $needle 需要替换的字符串 * @param string $replace 替换后的字符串 * @param&nbs