php
Cocoanerd
Pick a schedule you can live with, and stick to it. I don’t care if you suck at writing, if nobody reads, if you have nothing interesting to say. If you can demonstrate a willingness to write, and a desire to keep continually improving your writing, you will eventually be successful.
展开
-
php中inclued、include_once和require、require_once
include_once产生一个警告而require_once则导致一个致命错误。require_once无论如何都会包含文件,而include_once可以有选择地包含.作用都是把页面引入当前页,若重复调用包含了相同页面的语句,它只执行一次;1.include语句使用include语句可以告诉PHP提取特定的文件,并载入它的全部内容1234原创 2016-12-01 14:43:17 · 1069 阅读 · 0 评论 -
eayui-tree的id及text的基本使用,通过id设置某个节点选中
easyui-tree通过id选中某个子节点原创 2017-07-17 14:28:04 · 816 阅读 · 0 评论 -
字符串相关的一道题
运用字符串分割,动态创建数组以及动态往数组中添加元素。原创 2017-07-14 11:14:43 · 307 阅读 · 0 评论 -
easyui-tree相关
easyui-tree相关js代码转载 2017-07-17 11:30:50 · 279 阅读 · 0 评论 -
随机生成验证码
//随机生成一个4位数的数字验证码 $num=rand(1000,9999);//"";// for($i=0;$i// $num .= rand(0,9);// } //4位验证码也可以用rand(1000,9999)直接生成 //将生成的验证码写入session,备验证页面使用 Session_start();$_SESSION["Checknum"] =原创 2017-07-05 15:15:45 · 523 阅读 · 0 评论 -
js日期比较
//事件比较函数 function compareDate(strDate1,strDate2) { var date1 = new Date(strDate1.replace(/-/g, “\/”)); var date2 = new Date(strDate2.replace(/-/g, “\/”)); return date原创 2017-06-23 15:13:22 · 387 阅读 · 0 评论 -
自定义validatebox的验证方法
(document).ready(function(){(document).ready(function(){ .extend(.fn.validatebox.defaults.rules, { carnames: { validator: function(value){ var flag;原创 2017-07-03 10:38:08 · 378 阅读 · 0 评论 -
验证上传图片格式
// 上传照片的限制 var src_file = (“#uplicensefile”).val(); var AllImgExt=”.jpg|.jpeg|.gif|.bmp|.png|”; if(src_file!=”“) //2017-1-6 { var extName = src_file.substring(src_file.lastInde原创 2017-07-03 10:27:47 · 568 阅读 · 0 评论 -
jquery.ajax传参数方式、form提交方式
jQuery.ajax({ type: “POST”, url: “cmd.php”, data: {does:”queryaccount”,acid:id}, //”?do=2&sim=”+sim,success: function(msg){ if(msg.length>2) { var childArr=eval('(原创 2017-07-03 10:22:23 · 1427 阅读 · 0 评论 -
输出表格字段信息
function postquery(jspagesize,jspage) { fetch_object(“pindex”).value=jspage; fetch_object(“psize”).value=jspagesize; document.getElementById(“does”).value=”query”; .ajax({原创 2017-07-03 10:19:34 · 435 阅读 · 0 评论 -
$.ajax()方法详解
$.ajax()方法解释转载 2017-03-14 16:25:55 · 419 阅读 · 0 评论 -
让easyui-datebox控件只显示年份和月份
function myformatter(date){ var y = date.getFullYear(); var m = date.getMonth()+1; return y+'-'+(m}function myparser(s){ if (!s) return new Date(); var ss = (s.split('-')原创 2016-11-26 12:48:03 · 4707 阅读 · 0 评论 -
php中isset和empty的区别
主要的差别在于是否将0当作空来看待。加入var $a = 0;if (empty($a)){ }true,返回空。empty将$a当作空来处理if(isset($a)){}true,返回0isset将$a当作0来处理原创 2016-11-01 16:10:35 · 443 阅读 · 0 评论 -
easyui-panel Demo
//easyui-panel描绘统计图原创 2017-07-17 18:09:09 · 493 阅读 · 0 评论