控制器: public function actionTests1(){ $c = new \app\components\cat(); $m = new \app\components\mou; $g = new \app\components\dog; Event::on(\app\compon ...
分类:
其他好文 时间:
2016-08-30 00:06:15
阅读次数:
148
1、开启自带缩略图功能在function.php添加add_theme_support(‘post-thumbnails‘);字面意思:添加主题支持,括号内为字段名2、如何调用这个字段<?phpthe_post_thumbnail();?>3、设置缩略图的大小:在function.php中刚刚插入的add_theme_support(‘post-thumbnails’);后面..
分类:
其他好文 时间:
2016-08-29 22:46:21
阅读次数:
162
自定义函数function.yangA.php页面采用插件形式调用<?php
/*
*文件名
*function.函数名.phpfunction.yangA.php
*声明的函数名规则
*smarty_function_函数名()smarty_function_yangA
*参数
*1.数组array
*2.smarty
*模板使用
*<{yangAcontent="IamMr.Yang"color="red"size..
分类:
Web程序 时间:
2016-08-29 20:53:34
阅读次数:
193
① 文件:1,压缩版本:用于开发(体积小) 2,未压缩版本:用于开发环境(容易看) ② $表示jQuery ③ jQuery入口:1,$(function(){}) 2, jQuery(function(){}) 3, $(document).ready(function(){}) ④ 语法:jQu ...
分类:
其他好文 时间:
2016-08-29 19:10:10
阅读次数:
90
1. Javascript编译器在遇到function这个关键字时,默认认为它是function声明,而不是表达式。 2. 在已声明的function后面加括号,即可调用它。比如, function foo(){console.log('hello javascript.')} foo(); 3. ...
分类:
编程语言 时间:
2016-08-29 17:45:27
阅读次数:
171
$("cli-open").click(function(){ var scrollTop = document.body.scrollTop;//保存点击前滚动条的位置 window.onscroll=function(){ document.body.scrollTop = scrollTop; ...
分类:
移动开发 时间:
2016-08-29 17:38:39
阅读次数:
313
javascript的几种基本类型: 我看到网上一篇文章说是typeof无法判断function,可是为什么我试验了一下是可以判断的呢?不懂,欢迎各位看到有什么问题可以留言哦 array:typeof无法判断array倒确实,用Obeject.prototype.toString.call() nu ...
分类:
Web程序 时间:
2016-08-29 14:31:06
阅读次数:
163
一、未来元素:live 可以给还没创建出来的元素附上事件ps:$(".div").live("click",function(){}) 二、颜色渐变用到Jquery封装好的jquery.color.js 三、弹窗制作的一些知识点获取浏览器高度:var llbo = window.innerHeigh ...
分类:
Web程序 时间:
2016-08-29 14:31:04
阅读次数:
132
//2016-08-26
/**
*Checkthatthegivenfileisavalidfileinstance.
*
*@parammixed$file
*@returnbool
*/
protectedfunctionisValidFile($file)
{
return$fileinstanceofSplFileInfo&&$file->getPath()!=‘‘;
//ifbothaboutthisisokthanitisok
}//Checkthatthegivenfil..
分类:
Web程序 时间:
2016-08-29 13:22:00
阅读次数:
257
<?//为了避免重复包含文件而造成错误,加了判断函数是否存在的条件:if(!function_exists(pageft)){//定义函数pageft(),三个参数的含义为://$totle:信息总数;//$displaypg:每页显示信息数,这里设置为默认是20;//$url:分页导航中的链接,除了加入不同的查询信息“page..
分类:
Web程序 时间:
2016-08-29 13:08:57
阅读次数:
211