随笔分类 - php
摘要:一、数据类型integer ex:$intName1 = 12;double ex:$a=100.0235;boolean ex:$boolName1 = false;string ex:$tringName1 = "hello";二、集合array ex:$array = array(1,2,3);object ex:$a = new A();三、流程if ex:<?php$foo = "xxx";if($foo == "xxx"){ echo "==";}else{ echo "!="
阅读全文
摘要:$date1 = strtotime('2011-04-30'); //把日期转换成时间戳$date2 = time(); //取当前时间的时间戳 $nowtime=strftime("%y年-%m月-%d日 ",$date2); //格式化输出日期 $days=round(($date1-$date2)/3600/24); //四舍五入 echo "今天是<font color=\"red\">".$nowtime."</font>";echo "<br/&
阅读全文

浙公网安备 33010602011771号