摘要: <?php date_default_timezone_set('PRC'); //默认时区 echo "今天:",date("Y-m-d",time()),"<br>"; echo "今天:",date("Y-m-d",strtotime("18 june 2008")),"<br>"; echo 阅读全文
posted @ 2017-08-03 16:46 阿星小栈 阅读(187) 评论(0) 推荐(0)
摘要: 用serialize()序列化数据后插入数据库,再用unserialize()反序列化出来的时候遇到了部分数据字符串报错; 解决方法: function mb_unserialize($serial_str) { $out = preg_replace('!s:(\d+):"(.*?)";!se', 阅读全文
posted @ 2017-08-03 15:13 阿星小栈 阅读(401) 评论(0) 推荐(0)
摘要: 判断字符串是否为空 var strings = ''; if (string.length == 0) { alert('不能为空'); } var strings = ''; if (string.length == 0) { alert('不能为空'); } 判断字符串是否为“空”字符即用户输入 阅读全文
posted @ 2017-08-03 14:22 阿星小栈 阅读(719) 评论(0) 推荐(0)