上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页
  2014年4月24日
摘要: (1)date用法: date(格式,[时间]);如果没有时间参数,则使用当前时间. 格式是一个字符串,其中以下字符有特殊意义:U 替换成从一个起始时间(好象是1970年1月1日)以来的秒数Y 替换成4位的年号.y 替换成2位的年号.F 替换成月份的英文全称.M 替换成月份的英文简称.m 替换成月份... 阅读全文
posted @ 2014-04-24 13:33 张扬个性,敢为天下先 阅读(350) 评论(0) 推荐(1) 编辑
  2014年4月15日
摘要: MySQL可以通过field()函数自定义排序,格式:field(value,str1,str2,str3,str4),value与str1、str2、str3、str4比较,返回1、2、3、4,如遇到null或者不在列表中的数据则返回0.mysql> select * from driver_lo... 阅读全文
posted @ 2014-04-15 10:32 张扬个性,敢为天下先 阅读(3983) 评论(0) 推荐(0) 编辑
  2014年4月11日
摘要: 1.number_format{$number|number_format=2} 千分位,保留两位小数2.round {$number|round=2} 四舍五入保留两位小数 阅读全文
posted @ 2014-04-11 17:14 张扬个性,敢为天下先 阅读(5595) 评论(0) 推荐(0) 编辑
  2014年3月28日
摘要: 1.下载PHPMailer类包下载地址https://code.google.com/a/apache-extras.org/p/phpmailer注意把文件放在:ThinkPHP/Extend/Vendor/PHPMailer/class.phpmailer.php2.function SendMail($address,$title,$message){ vendor('PHPMailer.class#PHPMailer'); $mail=new PHPMailer(); // 设置PHPMailer使用SMTP服务器发送Email $mail->IsSMTP().. 阅读全文
posted @ 2014-03-28 14:57 张扬个性,敢为天下先 阅读(509) 评论(0) 推荐(0) 编辑
  2014年3月5日
摘要: $begintime=str_replace("-", "","2014-03-05"); (需要替换的字符串,换成字符串,需要被替换的字符串)输出:20140305 阅读全文
posted @ 2014-03-05 14:56 张扬个性,敢为天下先 阅读(361) 评论(0) 推荐(0) 编辑
  2014年2月13日
摘要: 使用如下语句SELECT * into table_bakFROM table可把表table中的数据备份到 table_bak,而且无需重新建table_bak。会自动生成表table_bak 阅读全文
posted @ 2014-02-13 14:05 张扬个性,敢为天下先 阅读(19343) 评论(5) 推荐(1) 编辑
  2014年2月11日
摘要: 错误提示error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 35 bytes) in D:\www\ThinkPHP\Common\common.php on line 657解决方案在 php.ini 中找到memory设置大小设置大点最后重启APACHE 阅读全文
posted @ 2014-02-11 16:16 张扬个性,敢为天下先 阅读(299) 评论(0) 推荐(0) 编辑
  2014年1月8日
摘要: 1.下载并应用LitJson,DLL文件2.建两个类; public class JsonData { public string result { get; set; } public List info { get; set; } } public GameData() { } #region Model private int _id; private string _dept; private string _sid; private string ... 阅读全文
posted @ 2014-01-08 14:31 张扬个性,敢为天下先 阅读(6984) 评论(1) 推荐(0) 编辑
  2014年1月3日
摘要: implode把数组转成字符串的函数,在组合SQL语句时候使用特好使!比如$a = array('a','b','c');$b = implode(',', $a);echo $b;返回的字符串就是 a,b,cexplode把字符串组成的数组$pizza="piece1piece2piece3piece4piece5piece6";$pieces=explode("",$pizza); 阅读全文
posted @ 2014-01-03 10:54 张扬个性,敢为天下先 阅读(560) 评论(0) 推荐(0) 编辑
  2013年12月13日
摘要: 后台: ModelState.AddModelError("userPwd", "请输入密码!"); ModelState是一个字典类型,这句话的作用是向ModelState中添加一条错误信息,第一个参数是Key,第二个参数是Value。前台:Html.ValidationMessage(key) 阅读全文
posted @ 2013-12-13 10:21 张扬个性,敢为天下先 阅读(4647) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 19 下一页