随笔分类 - Z History
过完的技术,进行存档
摘要:'希亚', 'Age'=>20 );$jsonencode = json_encode($arr);echo $jsonencode;?>程序运行结果如下:{"Name":null,"Age":20}json_encode 函数中中文被编码成 null 了,Google...
阅读全文
摘要:大写Y效果:$nowtime = time(); $nowtime=date("Y-m-d",$nowtime);结果: 2015-10-24小写y效果:$nowtime = time();$nowtime=date("Y-m-d",$nowtime);结果: 15-10-24
阅读全文
摘要:ThinkPHP项目公共方法写在 根目录-> app-> common 里面ThinkPHP模板公共方法卸载 根目录->app->模块名称->common 里面
阅读全文
摘要:php项目代码 编码格式不对会大范围报错
阅读全文
摘要:/** * 获取菜单 * @param number $id * @return multitype: */ public function menu($id = 0) { $menu = M ( 'menu' ); $arrlist = array (); // 数组必须初始化,否p...
阅读全文
摘要:1,$data存放实体:$data['title'] = I('post.title'); // 标题 $data['content'] = I('post.content'); // 正文 $data['postdate'] = I('post.postdate'); // ...
阅读全文
摘要:第一种方法$data = M('news')->field("title,date_format(postdate,'%Y-%m-%d') as postdate,content")->where($map)->limit(1)->find(); var_dump( M...
阅读全文
摘要:$ss = str_replace(array('年','月','日'), array('-','-',''), $datetime);
阅读全文
摘要:javascript的作用域 是按照 函数来划分的。网址:http://www.cnblogs.com/rubylouvre/archive/2009/08/21/1551270.html
阅读全文
摘要:var memInfo = enumType.GetType().GetMember(enumType.ToString()); var attributes = memInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false).
阅读全文
摘要:using LitJson;//自定义Json类JsonDataResult jsondata = new JsonDataResult() { Success = false }; HttpContext.Current.Response.Write(JsonMapper.ToJson(jsond...
阅读全文
摘要:1.选择器(1)通配符:$("input[id^='code']");//id属性以code开始的所有input标签$("input[id$='code']");//id属性以code结束的所有input标签$("input[id*='code']");//id属性包含code的所有input标签(...
阅读全文
摘要:Sql Server 中一个非常强大的日期格式化函数Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AMSelect CONVERT(varchar(100), GETDATE(), 1): 05/16/06Select CON...
阅读全文
摘要:private static string GetWeekName() { string weekName = ""; switch (DateTime.Now.DayOfWeek) { ...
阅读全文
摘要:onerror 事件会在文档或图像加载过程中发生错误时被触发。案例:如果: src 路径加载错误;则触发 onerror事件 。
阅读全文
摘要:public string integralpercentage;integralpercentage = ((double)user.Credits / integralmax).ToString("P");
阅读全文
摘要:Nvarchar : 可变长度的 , Unicode 编码。 长度 1-4000, 1个汉子 或者 字符 都是 2个字节。 支持多语言, 配合 大写 N 可以防止出现乱码。 char: 固定长度,剩余空格填充,故需要用Trim 来取消多余空格。 效率...
阅读全文
摘要:自适应高度 参考文章:http://www.web-tinker.com/search/JavaScript%20%E6%B6%88%E6%81%AF%E6%9C%BA%E5%88%B6/2.html
阅读全文

浙公网安备 33010602011771号