摘要: a鏈接如下:下载簡單下載自定義函數:/** * download files * $file_path : the file to download * $out_filename: 下载显示的文件名称 */function _download($file_path,$out_filename="d... 阅读全文
posted @ 2015-01-17 01:07 Zell~Dincht 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 在寫一個全選、取消全選、反選的功能時。未來元素[type='checkbox'],在使用了jquery-1.11.1.min.js版本的jquery時:功能版本1:存在的問題,當使用了attr時,出現,這個操作的未來元素只能點擊第一次有效,即是說,當刷新頁面,我點擊選中,可以選中,點擊取消全校可以取... 阅读全文
posted @ 2015-01-13 22:54 Zell~Dincht 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 方法:$(window).scroll(function (){})属性:滚动变化值$(window).scrollTop();$(window).scrollLeft();需要结合的样式:position:relative;top:?;left:?改变top和left的值达到固定效果。例子:$(w... 阅读全文
posted @ 2015-01-06 11:17 Zell~Dincht 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 电商接口京东获取单个商品价格接口:http://p.3.cn/prices/mgets?skuIds=J_商品ID&type=1ps:商品ID这么获取:http://item.jd.com/954086.html物流接口快递接口:http://www.kuaidi100.com/query?type... 阅读全文
posted @ 2015-01-03 00:35 Zell~Dincht 阅读(215) 评论(0) 推荐(0) 编辑
摘要: IE7:div或者li的高度不会随着内容的增加而自动增加。解决办法:给div一个最小高度,min-height:? 阅读全文
posted @ 2014-12-26 16:23 Zell~Dincht 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 在处理表单的时候,如果表单的字段量比较大的时候,我们处理起来会比较费劲。这时候,ThinkPHP的自动完成功能可以很好的解决这个问题。这里介绍的是ThinkPHP中的静态验证:静态定义方式因为必须定义模型类,所以只能用D函数实例化模型这个表是用来测试用的。我们需要一个表单: ... 阅读全文
posted @ 2014-12-22 12:15 Zell~Dincht 阅读(1573) 评论(0) 推荐(0) 编辑
摘要: 看以下代码:var s = [ { name: "Robin Van PurseStrings", age: 30 } ,{ name: "Theo Walcott", age: 24 } ,{ name: "Bacary Sagna", age: 2... 阅读全文
posted @ 2014-12-19 16:31 Zell~Dincht 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 如果在使用PHPMailer类发送邮件的时候,在windows系统测试正常,但是部署到linux服务器上就发送失败,并且报错:SMTP connect() failed.原因是:1 该linux服务器上allow_url_fopen 值为off2查看disable_functions=.......... 阅读全文
posted @ 2014-12-10 13:04 Zell~Dincht 阅读(403) 评论(0) 推荐(0) 编辑
摘要: 一、当我请求远程服务器地址时返回的数据是json数据,这时我先用$stdClassObj = json_decode($res);得到一个非PHP标准数组,我们需要将这个对象转化为数组,就需要应用这个自定义方法:function stdClassObj2array($array) { if(i... 阅读全文
posted @ 2014-12-09 17:11 Zell~Dincht 阅读(398) 评论(0) 推荐(0) 编辑
摘要: 本文来自互联网:http://www.php100.com/html/php/hanshu/2013/0905/4345.htmlfile_get_contents函数多用来于来采集远程服务器上的内容,但使用file_get_contents函数之前我们在php.ini中是必须把allow_url_... 阅读全文
posted @ 2014-12-09 16:58 Zell~Dincht 阅读(2242) 评论(0) 推荐(0) 编辑
摘要: 轮播图实现中,发现当点击切换按钮时,如果用户点快乐,双击了按钮,就会选中文本。十分影响浏览效果,所以有了这篇文章。IE以及谷歌下的解决办法:此法对火狐无用!于是火狐下的方法,搜录在此:#zell-carousel{ -moz-user-select:none; }以上综合使用则达到了语气目... 阅读全文
posted @ 2014-12-04 18:42 Zell~Dincht 阅读(138) 评论(0) 推荐(0) 编辑
摘要: function siv() { /*javascript执行代码*/ javascript code... /*递归实现*/ setTimeout(function (){ siv(); },time);}//调用siv(); 阅读全文
posted @ 2014-12-01 12:17 Zell~Dincht 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2014-11-12 18:07 Zell~Dincht 阅读(86) 评论(0) 推荐(0) 编辑
摘要: /*监听滚动条,显示或者隐藏某元素*/window.onscroll = function(){ var t = document.documentElement.scrollTop || document.body.scrollTop; var subBox = document... 阅读全文
posted @ 2014-11-11 13:46 Zell~Dincht 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 实现浮动层居中的方法,搜集在此:.css{ width:950px; left:50%; margin-left:-475px; top:0; position:relative;} 阅读全文
posted @ 2014-11-11 10:56 Zell~Dincht 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 今天把本地代码部署到服务器上,但是登录怎么也不能用,更别说其他了,找了程序的原因,但本地一切正常。最后的解决办法是:修改ThinkPHP的配置文件, 把URL_MODEL => 3 就生效了先记下,日后补充细则。 阅读全文
posted @ 2014-11-05 15:43 Zell~Dincht 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 今天在公司用ftp上传的时候,文件都已经传上了服务器,但是无论怎么操作,都是不能按照程序执行下去:①以为上传文件没有上传完全。 因为之前出现过,上传终端导致文件上传不完全的情况,所以二话不说就是一个重新上传。 悲剧出现了: 程序依然无法运行,而且还程序错误,明显文件中可能数据都有丢失。②找度娘... 阅读全文
posted @ 2014-11-05 11:36 Zell~Dincht 阅读(886) 评论(0) 推荐(0) 编辑
摘要: 这里需要注意wamp中的服务器配置文件:一、httpd.conf文件所有的Deny from all 改为 Allow from all//提示:如果有伪静态文件,一定要开启伪静态扩展。Servername:改为IP地址。listen 80改为:IP地址:80二、httpd-vhosts.conf文... 阅读全文
posted @ 2014-11-03 17:50 Zell~Dincht 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 2个域名,非常不同,域名甲向域名乙提交数据,域名乙获取数据返回处理数据后的结果。域名甲页面test.html,核心代码$(".sub-btn").bind('click',function () { var form = $(this).parents("form"), data = f... 阅读全文
posted @ 2014-11-03 15:36 Zell~Dincht 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 在用户登录或者其他表单提交时,一般用户习惯是使用回车提交。所以这个功能很小,但是不容忽略。下面是Jquery的回车提交事件的使用。假定页面中回车提交的按钮是 $("#btn");/*回车触发登录*/function key13($jq) { $("body").keydown(function (... 阅读全文
posted @ 2014-11-03 13:15 Zell~Dincht 阅读(118) 评论(0) 推荐(0) 编辑
摘要: //在自动生成的目录结构中,为了防止目录结构被访问,ThinkPHP会自动创建index.html文件//设定目录生成的文件define('DIR_SECURE_FILENAE','default.html');//设定该自动生成文件的内容define('DIR_SECURE_CONTENT','访... 阅读全文
posted @ 2014-10-31 23:58 Zell~Dincht 阅读(101) 评论(0) 推荐(0) 编辑
摘要: 我用的是最新版!找到以下2个关键文件:YourPath.../Ueditor/php/config.jsonYourPath.../Ueditor/php/Uploader.class.phpconfig.json找到如下代码: "imagePathFormat": "...(这里不用管)",... 阅读全文
posted @ 2014-10-27 17:37 Zell~Dincht 阅读(807) 评论(0) 推荐(0) 编辑
摘要: 一般我们都是在本页面中跳转,直接window.location.href = yourJumpUrl;但是要跳转到新页面的话,需要这么做:①:var newWin = window.open('_blank');②:$.ajax( .. . . ... ., success:function ... 阅读全文
posted @ 2014-10-27 11:33 Zell~Dincht 阅读(1244) 评论(0) 推荐(0) 编辑
摘要: table { padding:0;margin:0 auto; border-collapse:collapse; border-width:1px 0 0 1px; border:1px solid #ccc;}table td{ border:1px solid #ccc; text-ali... 阅读全文
posted @ 2014-10-23 13:59 Zell~Dincht 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 删除一个session值: session_unset(变量); session_destroy(变量);删除一个cookie: 注意第二个参数中手册中的说明是: Cookie 必须用和设定时的同样的参数才能删除。如果其值一个空字符串,或者是 FALSE,并且其它的参数都和前一次调用 s... 阅读全文
posted @ 2014-10-22 13:29 Zell~Dincht 阅读(190) 评论(0) 推荐(0) 编辑
摘要: listTb.find('.chk-box').each(function (i) { var _this = $(this); _this.attr('checked',!_this.get(0).checked);}); listTb.find('.chk-bo... 阅读全文
posted @ 2014-10-22 10:50 Zell~Dincht 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 点击事件按钮 添加元素按钮 阅读全文
posted @ 2014-10-22 09:17 Zell~Dincht 阅读(312) 评论(0) 推荐(0) 编辑
摘要: //配置php.ini开启allow_url_fopen选项//访问的文件有可读或者可写的权限 //$f = fopen('http://www.example.com/a.txt','rb');//$f = fopen('http://www.example.com/a.txt','wb');//... 阅读全文
posted @ 2014-10-19 23:06 Zell~Dincht 阅读(536) 评论(0) 推荐(0) 编辑
摘要: <?php//定义一个函数 统计目录大小函数function dirSize($dirName) { //判断目录是否存在 if (!file_exists($dirName)) { die('目录不存在!'); } //判断是否是目录 i... 阅读全文
posted @ 2014-10-19 22:51 Zell~Dincht 阅读(162) 评论(0) 推荐(0) 编辑
摘要: //定义一个函数 读取目录信息的函数function dirInfo($dirName) { //判断目录是否存在 if (!file_exists($dirName)) { die('目录不存在!'); } //判断是否是目录 if (!... 阅读全文
posted @ 2014-10-19 22:46 Zell~Dincht 阅读(195) 评论(0) 推荐(0) 编辑