xiaoguozi's Blog
Pay it forword - 我并不觉的自豪,我所尝试的事情都失败了······习惯原本生活的人不容易改变,就算现状很糟,他们也很难改变,在过程中,他们还是放弃了······他们一放弃,大家就都是输家······让爱传出去,很困难,也无法预料,人们需要更细心的观察别人,要随时注意才能保护别人,因为他们未必知道自己要什么·····
     摘要: 转自:http://www.cnblogs.com/-OYK/archive/2011/08/03/2126657.html Android的消息机制(一) android 有一种叫消息队列的说法,这里我们可以这样理解:假如一个隧道就是一个消息队列,那么里面的每一部汽车就是一个一个消息,这里我们先忽略掉超车等种种因素,只那么先进隧道的车将会先出,这个机制跟我们and...  阅读全文
posted @ 2012-03-12 23:35 小果子 阅读(289) | 评论 (0)编辑 收藏
     摘要: 我们知道,Android应用程序是通过消息来驱动的,即在应用程序的主线程(UI线程)中有一个消息循环,负责处理消息队列中的消息。我们也知 道,Android应用程序是支持多线程的,即可以创建子线程来执行一些计算型的任务,那么,这些子线程能不能像应用程序的主线程一样具有消息循环呢?这 些子线程又能不能往应用程序的主线程中发送消息呢?本文将分析Android应用程序线程消息处理模型,为读者解答这两个问...  阅读全文
posted @ 2012-03-12 23:33 小果子 阅读(1821) | 评论 (0)编辑 收藏

1.软键盘的显示原理

软键盘其实是一个Dialog。InputMethodService为我们的输入法创建了一个Dialog,并且对某些参数进行了设置,使之能够在底部 或者全屏显示。当我们点击输入框时,系统会对当前的主窗口进行调整,以便留出相应的空间来显示该Dialog在底部,或者全屏。

2.活动主窗口调整
       Android定义了一个属性windowSoftInputMode, 用它可以让程序控制活动主窗口调整的方式。我们可以在配置文件AndroidManifet.xml中对Activity进行设置。这个属性的设置将会影响两件事情:
       1>软键盘的状态——隐藏或显示。
       2>活动的主窗口调整——是否减少活动主窗口大小以便腾出空间放软键盘或是否当活动窗口的部分被软键盘覆盖时它的内容的当前焦点是可见的。
       故该属性的设置必须是下面列表中的一个值,或一个“state…”值加一个“adjust…”值的组合。在任一组设置多个值,各个值之间用|分开。
"stateUnspecified":The state of the soft keyboard (whether it is hidden or visible) is not specified. The system will choose an appropriate state or rely on the setting in the theme. This is the default setting for the behavior of the soft keyboard. 软键盘的状态(隐藏或可见)没有被指定。系统将选择一个合适的状态或依赖于主题的设置。这个是软件盘行为的默认设置。
"stateUnchanged":The soft keyboard is kept in whatever state it was last in, whether visible or hidden, when the activity comes to the fore. 软键盘被保持上次的状态。
"stateHidden":The soft keyboard is hidden when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity. 当用户选择该Activity时,软键盘被隐藏。
"stateAlwaysHidden":The soft keyboard is always hidden when the activity's main window has input focus. 软键盘总是被隐藏的。
"stateVisible":The soft keyboard is visible when that's normally appropriate (when the user is navigating forward to the activity's main window). 软键盘是可见的。
"stateAlwaysVisible":The soft keyboard is made visible when the user chooses the activity — that is, when the user affirmatively navigates forward to the activity, rather than backs into it because of leaving another activity. 当用户选择这个Activity时,软键盘是可见的。
"adjustUnspecified":It is unspecified whether the activity's main window resizes to make room for the soft keyboard, or whether the contents of the window pan to make the currentfocus visible on-screen. The system will automatically select one of these modes depending on whether the content of the window has any layout views that can scroll their contents. If there is such a view, the window will be resized, on the assumption that scrolling can make all of the window's contents visible within a smaller area. This is the default setting for the behavior of the main window. 它不被指定是否该Activity主窗口调整大小以便留出软键盘的空间,或是否窗口上的内容得到屏幕上当前的焦点是可见的。系统将自动选择这些模式中一种 主要依赖于是否窗口的内容有任何布局视图能够滚动他们的内容。如果有这样的一个视图,这个窗口将调整大小,这样的假设可以使滚动窗口的内容在一个较小的区 域中可见的。这个是主窗口默认的行为设置。也就是说,系统自动决定是采用平移模式还是压缩模式,决定因素在于内容是否可以滚动。
"adjustResize":(压缩模式)The activity's main window is always resized to make room for the soft keyboard on screen. 当软键盘弹出时,要对主窗口调整屏幕的大小以便留出软键盘的空间。
"adjustPan":(平移模式:当输入框不会被遮挡时,该模式没有对布局进行调整,然而当输入框将要被遮挡时,窗口就会进行平移。也就是说,该模式始终是保持输入框为可见。)The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window. 该Activity主窗口并不调整屏幕的大小以便留出软键盘的空间。相反,当前窗口的内容将自动移动以便当前焦点从不被键盘覆盖和用户能总是看到输入内容的部分。这个通常是不期望比调整大小,因为用户可能关闭软键盘以便获得与被覆盖内容的交互操作。。
3.侦听软键盘的显示隐藏
       有时候,借助系统本身的机制来实现主窗口的调整并非我们想要的结果,我们可能希望在软键盘显示隐藏的时候,手动的对布局进行修改,以便使软键盘弹出时更加美观。这时就需要对软键盘的显示隐藏进行侦听。
       我们可以借助软键盘显示和隐藏时,对主窗口进行了重新布局这个特性来进行侦听。如果我们设置的模式为压缩模式,那么我们可以对布局的onSizeChanged函数进行跟踪,如果为平移模式,那么该函数可能不会被调用。

4.EditText默认不弹出软件键盘
方法一:
在AndroidMainfest.xml中选择哪个activity,设置windowSoftInputMode属性为adjustUnspecified|stateHidden
例如:<activity android:name=".Main"
                  android:label="@string/app_name"
                  android:windowSoftInputMode="adjustUnspecified|stateHidden"
                  android:configChanges="orientation|keyboardHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
方法二:
让EditText失去焦点,使用EditText的clearFocus方法
例如:EditText edit=(EditText)findViewById(R.id.edit);
           edit.clearFocus();
方法三:
强制隐藏Android输入法窗口
例如:EditText edit=(EditText)findViewById(R.id.edit); 
           InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
           imm.hideSoftInputFromWindow(edit.getWindowToken(),0);

5.EditText始终不弹出软件键盘
例:EditText edit=(EditText)findViewById(R.id.edit);
 

      edit.setInputType(InputType.TYPE_NULL);

posted @ 2012-03-09 20:28 小果子 阅读(954) | 评论 (0)编辑 收藏

先来介绍几个核心函数:

 

mktime 函数

mktime() 函数返回一个日期的 Unix 时间戳。

参数总是表示 GMT 日期,因此 is_dst 对结果没有影响。

参数可以从右到左依次空着,空着的参数会被设为相应的当前 GMT 值。

语法

mktime(hour,minute,second,month,day,year,is_dst)

 

Java代码  收藏代码
  1. 参数      描述  
  2. hour    可选。规定小时。  
  3. minute  可选。规定分钟。  
  4. second  可选。规定秒。  
  5. month   可选。规定用数字表示的月。  
  6. day             可选。规定天。  
  7. year    可选。规定年。在某些系统上,合法值介于 1901 - 2038 之间。不过在 PHP 5 中已经不存在这个限制了。  
  8. is_dst  可选。如果时间在日光节约时间(DST)期间,则设置为1,否则设置为0,若未知,则设置为-1。  
  9.   
  10. 自 5.1.0 起,is_dst 参数被废弃。因此应该使用新的时区处理特性。  

 

Java代码  收藏代码
  1. 例子  
  2.   
  3. mktime() 函数对于日期运算和验证非常有用。它可以自动校正越界的输入:  
  4.   
  5. <?php  
  6. echo(date("M-d-Y",mktime(0,0,0,12,36,2001)));  
  7. echo(date("M-d-Y",mktime(0,0,0,14,1,2001)));  
  8. echo(date("M-d-Y",mktime(0,0,0,1,1,2001)));  
  9. echo(date("M-d-Y",mktime(0,0,0,1,1,99)));  
  10. ?>  
  11.   
  12. 输出:  
  13.   
  14. Jan-05-2002  
  15. Feb-01-2002  
  16. Jan-01-2001  
  17. Jan-01-1999   

 

 

 

strtotime 函数

strtotime() 函数将任何英文文本的日期时间描述解析为 Unix 时间戳。

 

语法

strtotime(time,now)

 

Java代码  收藏代码
  1. 参数      描述  
  2. time    规定要解析的时间字符串。  
  3. now     用来计算返回值的时间戳。如果省略该参数,则使用当前时间。   
 

  一周之后:  strtotime("+1 week") ;

  一周之前:  strtotime("-1 week") ;

  一月之后:  strtotime("+1 months") ;

  一天之后:  strtotime("+1 days") ;      

 

  30秒之后 strtotime( " +30 seconds " );

  20分钟之后 strtotime( " +20 minutes " );

  12个小时之后 strtotime( " +12 hours " );

 

 

date 函数

date() 函数格式化一个本地时间/日期。

语法

date(format,timestamp)

 

 

date_default_timezone_set 函数

date_default_timezone_set() 函数设置用在脚本中所有日期/时间函数的默认时区。

语法

date_default_timezone_set(timezone)
Java代码  收藏代码
  1. 参数      描述  
  2. timezone    必需。时区标识符,比如 "UTC" 或 "Europe/Paris"。  
  3. 合法时区的列表:http://www.php.net/manual/en/timezones.php  
 

实例

 

第一种情况是没有数据库,只是得到的日期值进行比较的话,那就得完全用php的时间日期函数计算了,如下:


比如要计算2009-9-5到2009-9-18还有多少天:

 

Java代码  收藏代码
  1. <?php  
  2. $startdate=strtotime("2009-9-5");  
  3. $enddate=strtotime("2009-9-18");    //上面的php时间日期函数已经把日期变成了时间戳,就是变成了秒。这样只要让两数值相减,然后把秒变成天就可以了,比较的简单,如下:  
  4. $days=round(($enddate-$startdate)/3600/24) ;  
  5. echo $days;     //days为得到的天数;  
  6. ?>  

 

 第二种 孩子的成长

 

Java代码  收藏代码
  1. <?  
  2. date_default_timezone_set('Asia/Shanghai');  
  3. //以上一句为设置时区,其实不设也行,但是zde debug的时候会有提示,说什么不安全的函数…添上吧。  
  4.   
  5. echo date('Y-m-d H:i:s').' 今天是'.date('Y').'年的第'.date('W').'周';  
  6.   
  7. $stime='2005-11-03 10:08';  
  8. echo "<br/><br/>***自出生(<font color=blue>$stime</font>)以来…:<br/><br/>";  
  9. echo "今天是第<font color=red><b>".Lnbsp(daysofnow($stime),3)."</b></font>天<br/>";  
  10. echo "今天是第<font color=red><b>".Lnbsp(weeksofnow($stime),3)."</b></font>周<br/>";  
  11. echo "今天是第<font color=red><b>".Lnbsp(monthsofnow($stime),3)."</b></font>个月<br/>";  
  12. echo "今天是第<font color=red><b>".Lnbsp(yearsofnow($stime),3)."</b></font>年<br/>";  
  13. /* 
  14. $output=sprintf(" 今 天是第<font color=red><b>%03d</b></font>天<br/& gt;今天是第< font color=red><b>%03d</b></font>周< br/>今天是第< font color=red><b>%03d</b></font>个 月<br/>今天是第< font color=red><b>%03d</b></font& gt; 年<br/& gt;",daysofnow($stime),weeksofnow($stime),monthsofnow($stime),yearsofnow($stime)); 
  15. echo $output; 
  16. */  
  17.   
  18. function weeksofnow($stime)  
  19. {  
  20.     $ftime=strtotime($stime);  
  21.     $fweeks=date('w',$ftime);  
  22.     if ($fweeks==0) $fweeks=7;  
  23.     $nweeks=date('w');  
  24.     if ($nweeks==0) $nweeks=7;  
  25.     $ftemp=strtotime(date('Y-m-d 00:00:00',$ftime))-$fweeks*60*60*24;  
  26.     $ntemp=strtotime(date('Y-m-d 00:00:00',time()))+(7-$nweeks)*60*60*24;  
  27.     //echo date('w',$ftemp)."<br/>....<br/>".date('w',$ntemp)."<br/>";  
  28.     return ($ntemp-$ftemp)/60/60/24/7;  
  29. }  
  30.   
  31. function daysofnow($stime)  
  32. {  
  33.     $ftime=strtotime($stime);  
  34.     return ceil(abs((time()-$ftime)/(60*60*24)));  
  35. }  
  36.   
  37. function monthsofnow($stime)  
  38. {  
  39.     $ftime=strtotime($stime);  
  40.     $fmonth=date('m',$ftime);  
  41.     $fyear=date('Y',$ftime);  
  42.     $nmonth=date('m');  
  43.     $nyear=date('Y');  
  44.     $result=($nyear-$fyear)*12+$nmonth-$fmonth+1;  
  45.     return $result;  
  46. }  
  47.   
  48. function yearsofnow($stime)  
  49. {  
  50.     $ftime=strtotime($stime);  
  51.     $fyear=date('Y',$ftime);  
  52.     $nyear=date('Y');  
  53.     return $nyear-$fyear+1;  
  54. }  
  55.   
  56. // 下面的函数只是加空格用的,不是核心内容,只为美观  
  57. function Lnbsp($data,$num)  
  58. {  
  59.     $result=trim($data);  
  60.     for($i=$num;$i>=strlen($data);$i--) {  
  61.         $result='&nbsp;'.$result;  
  62.     }  
  63.     return $result;  
  64. }  
  65. ?>  

 

 第三种  明天,下个月和明年的日期,就可以用以下的代码:

 

Java代码  收藏代码
  1. $tomorrow     = date('Y-m-d',mktime (0,0,0,date("m"),date("d")+1,date("Y")));  
  2. $nextmonth   = date('Y-m',mktime (0,0,0,date("m")+1,date("d")+1,date("Y")));  
  3. $nextyear     = date('Y',mktime (0,0,0,date("m"),date("d"),date("Y")+1));   
  4.   
  5. echo $tomorrow.'<br/>';  
  6. echo $nextmonth.'<br/>';  
  7. echo $nextyear.'<br/>';  

 

第四种 工作时间(刨除假日)

 

 

Java代码  收藏代码
  1. <?  
  2. $startDate="2001-12-12";  
  3. $endDate="2002-11-1";  
  4.   
  5. $holidayArr=array("05-01","05-02","10-01","10-01","10-02","10-03","10-04","10-05","01-26","01-27","01-28","01-29");  
  6.         //假期日期数组,比方国庆,五一,春节等  
  7. $endWeek=2;  
  8.         //周末是否双休.双休为2,仅仅星期天休息为1,没有休息为0  
  9.   
  10. $beginUX=strtotime($startDate);  
  11. $endUX=strtotime($endDate);  
  12.   
  13. for($n=$beginUX;$n<=$endUX;$n=$n+86400){  
  14.     $week=date("w",$n);  
  15.     $MonDay=date("m-d",$n);  
  16.     if($endWeek){//去处周末休息  
  17.         if($endWeek==2){  
  18.             if($week==0||$week==6) continue;  
  19.         }  
  20.         if($endWeek==1){  
  21.             if($week==0) continue;  
  22.         }  
  23.     }  
  24.     if(in_array($MonDay,$holidayArr)) continue;  
  25.     $totalHour+=10;//每天工作10小时  
  26. }  
  27. echo "开始日期:$startDate<BR>";  
  28. echo "结束日期:$endDate<BR>";  
  29. echo "共花了".$totalHour."小时";  
  30. ?>  
 

 

第五种 mysql 处理日期 (防灌水)

 

Java代码  收藏代码
  1. // $ip = getenv('REMOTE_ADDR');  
  2.   
  3. $sql = "SELECT TIME_TO_SEC(NOW())-TIME_TO_SEC(time_at) from test ";  
  4.        //  或者   select   time_to_sec("1980-8-20 12:25:33") - time_to_sec("1997-1-23 6:04:56")  
  5.   
  6.       

 

或者用

 

Java代码  收藏代码
  1. SELECT DATEDIFF('2008-12-30','2008-12-29') AS DiffDate  
  2.   
  3. /* 
  4.  结果: 
  5. DiffDate 
  6. */  
 

或者

 

Java代码  收藏代码
  1. /* 
  2. 假设我们有如下的表: 
  3. OrderId     ProductName     OrderDate 
  4. 1            'Computer'     2008-12-29 16:25:46.635 
  5. */  
  6.   
  7. SELECT OrderId,DATE_ADD(OrderDate,INTERVAL 2 DAY) AS OrderPayDate FROM Orders  
  8.   
  9. /* 
  10. 结果: 
  11. OrderId     OrderPayDate 
  12. 1            2008-12-31 16:25:46.635 
  13. */  

详见:http://www.w3school.com.cn/sql/func_date_format.asp

         http://www.w3school.com.cn/sql/sql_dates.asp

 

 

给出秒算小时 php

Php代码  收藏代码
  1. <?php  
  2. function transform($sec){  
  3.   
  4.     $output = '';  
  5.       
  6.     $hours = floor($sec / 3600);  
  7.     $remainSeconds = $sec % 3600;  
  8.   
  9.     $minutes = floor($remainSeconds / 60);  
  10.     $seconds = $sec - $hours * 3600 - $minutes * 60;  
  11.   
  12.     if($sec >= 3600){   
  13.         $output .= $hours.' h / ';  
  14.         $output .= $minutes.' m / ';  
  15.     }  
  16.   
  17.     if($sec >= 60 && $sec < 3600){  
  18.         $output .= $minutes.' m / ';  
  19.     }  
  20.       
  21.     return $output .= $seconds.' s ';  
  22. }  
  23.   
  24. echo transform(3231803);  
  25.   
  26. ?>  
 

帖子发表于**前 (时间戳与日期换算的应用)

Php代码  收藏代码
  1. <?php  
  2. function units($time){  
  3.   $year   = floor($time / 60 / 60 / 24 / 365);  
  4.   $time  -= $year * 60 * 60 * 24 * 365;  
  5.   $month  = floor($time / 60 / 60 / 24 / 30);  
  6.   $time  -= $month * 60 * 60 * 24 * 30;  
  7.   $week   = floor($time / 60 / 60 / 24 / 7);  
  8.   $time  -= $week * 60 * 60 * 24 * 7;  
  9.   $day    = floor($time / 60 / 60 / 24);  
  10.   $time  -= $day * 60 * 60 * 24;  
  11.   $hour   = floor($time / 60 / 60);  
  12.   $time  -= $hour * 60 * 60;  
  13.   $minute = floor($time / 60);  
  14.   $time  -= $minute * 60;  
  15.   $second = $time;  
  16.   $elapse = '';  
  17.   
  18.   $unitArr = array('年'  =>'year', '个月'=>'month',  '周'=>'week', '天'=>'day',  
  19.                    '小时'=>'hour', '分钟'=>'minute', '秒'=>'second'  
  20.                    );  
  21.   
  22.   foreach ( $unitArr as $cn => $u )  {  
  23.       if ( $$u > 0 )      {  
  24.           $elapse = $$u . $cn;  
  25.           break;  
  26.       }  
  27.   }  
  28.   
  29.   return $elapse;  
  30. }  
  31.   
  32. function stamp($past){  
  33.     date_default_timezone_set("America/New_York"); // 解决php5.1以上时间戳会与实际时间相差8小时,找时区请到http://www.php.net/manual/en/timezones.php  
  34.   
  35.     $year    =(int)substr($past,0,4); // 取得年份   
  36.     $month   =(int)substr($past,5,2); // 取得月份  
  37.     $day     =(int)substr($past,8,2); // 取得几号  
  38.   
  39.     $hour    =(int)substr($past,11,2); // 取得小时  
  40.     $minutes =(int)substr($past,14,2); // 取得分钟  
  41.     $second  =(int)substr($past,17,2); // 取得秒数  
  42.   
  43.     $past = mktime($hour,$minutes,$second,$month,$day,$year);  
  44.     $now  = time();      
  45.     $diff = $now - $past;  
  46.       
  47.     return '发表于' . units($diff) . '前';  
  48. }  
  49.   
  50. $past = '2009-12-24 16:49:00'; // 从数据库得到日期  
  51.   
  52. echo stamp($past);  
  53.   
  54. ?>  
 

两个日期相差的天数

 

#方法一:简单方法

 

Php代码  收藏代码
  1. $olddate = '2010-02-11'; //如果要用mktime函数,则要用explode拆解日期。  
  2. $oldtime = strtotime($olddate);  
  3. $passtime = time()-$oldtime; //经过的时间戳。  
  4. echo '你在网上泡了'.floor($passtime/(24*60*60)).'天了'.'<br />'; //12天。  
 

#方法二:用减去全年天数的时间戳来获取。

 

Php代码  收藏代码
  1. $yDate=1;  
  2. $yDate_Y=date('Y',time())-1; //年份-1,即去年  
  3. $yDateYMD="$yDate_Y-01-01";  
  4. $yYMD=strtotime($yDateYMD); //去年的1月1号时间戳。  
  5. $d=date('L',$yYMD)?366:365; //是否是闰年  
  6. $yYearTime=$d*24*60*60;  
  7.   
  8. $yYear=date('Y-m-d',time()-$yYearTime);  
  9. echo "去年的今天:$yYear<br />"; //2009-02-23  

 

#方法三:用直接截取当前日期的年份减一,但不严谨,没有考虑到闰年。

 

Php代码  收藏代码
  1. #计算60年前的今天。忽略当中经过的闰年。  
  2. $yDate_Y=$yDate_Y-59;  
  3. $md=explode('-',date('Y-m-d'));  
  4. $yYMD="$yDate_Y-{$md[1]}-{$md[2]}";  
  5. echo "60年前的今天:$yYMD <br />"; //1950-02-23  
 

#方法四: 用strtotime()和 GNU日期语法---------推荐!

 

Php代码  收藏代码
  1. //3天后; //当前时间为2010-02-23  
  2. $d=strtotime('3 days');  
  3. echo '3天后'.date('Y-m-d',$d)."<br />";  
  4. //3天前:  
  5. $d=strtotime('-3 days');  
  6. echo '3天前'.date('Y-m-d',$d)."<br />"; //2010-02-20  
  7. //一个月前:  
  8. $d=strtotime('-1 months');  
  9. echo '一个月前'.date('Y-m-d',$d)."<br />"; //2010-01-23  
  10.   
  11. //2个月后:  
  12. $d=strtotime('2 months');  
  13. echo '二个月后'.date('Y-m-d',$d)."<br />"; //2010-04-23  
  14.   
  15. //1年前:  
  16. $d=strtotime('-1 years');  
  17. echo '1年前'.date('Y-m-d',$d)."<br />"; //2009-02-23  
  18.   
  19. //2小时前:  
  20. $d=strtotime('-2 hours');  
  21. echo '目前:'.date('Y-m-d H:i:s',time()).',2小时前'.date('Y-m-d H:i:s',$d)."<br />"; //目前:2010-02-23 13:38:49,2小时前2010-02-23 11:38:49  
 

重设时间

 

Java代码  收藏代码
  1. //DateTime构造函数:o bject DateTime([string $time [,dateTimeZone $timezone])  
  2. $date = new DateTime('2010-02-23 12:26:36');  
  3. echo $date->format('Y-m-d H:i:s')."<br />"; //和date()函数相同。2010-02-23 12:26:36  
  4.   
  5. //重设时间:  
  6. //1、重设日期: boolean setDate(int year,int month,int day)  
  7. //2、重设时间: boolean setDate(int hour,int minute[,int second])  
  8. $date->setDate(2010,2,28);  
  9. echo $date->format('Y-m-d H:i:s')."<br />"; //2010-02-28 12:26:36  
  10.   
  11. //日期计算,相当于上面的strtotime()  
  12. $date->modify("+7 hours");  
  13. echo $date->format('Y-m-d H:i:s')."<br />"; //2010-02-28 19:26:36  
  14. $date->modify("3 days");  
  15. echo $date->format('Y-m-d H:i:s')."<br />"; //2010-03-03 19:26:36 //从上面被改过的28号开始  
  16.   
  17. /*PHP5在WIN不支持money_format函数? 
  18. setlocale(LC_MONETARY,'zh_CN'); 
  19. echo money_format("%i",786.56);//?Fatal error: Call to undefined function money_format() 
  20. */ 
posted @ 2012-03-06 22:39 小果子 阅读(1054) | 评论 (0)编辑 收藏
     摘要: [转载]马甲神功之android版 (2011-11-23 22:27:40)转载▼ 标签: 转载 分类: android ...  阅读全文
posted @ 2012-03-06 22:39 小果子 阅读(1507) | 评论 (0)编辑 收藏
仅列出标题
共58页: First 17 18 19 20 21 22 23 24 25 Last