2010年8月30日

【VMware】Use Bridge mode firewall configure

在使用 bridge mode 時必須要設定主機端的防火牆允許作轉送封包(transmit packet)的動作

我的防火牆為outpost pro 2009

所以就參考這篇作設定上的修正

http://www.agnitum.com/support/kb/article.php?id=1000061&lang=en

2010年8月2日

【s3c2410】CrossCompiler QT/E

http://www.cublog.cn/u1/44087/showart_346618.html



http://i-pogo.blogspot.com/2010/01/usrbinld-cannot-find-lxxx.html



http://blog.chinaunix.net/u3/93660/showart_1860650.html


【CentOS】Meta file does not match checksum

修改 /etc/yum.conf

加入

http_caching=packages

就ok了

2010年2月26日

【PHP】時間處理函數

最常用的有以下幾個


string date ( string $format [, int $timestamp ] )


int time ( void )


int mktime ([ int $hour = date("H") [, int $minute = date("i") [, int$second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1 ]]]]]]] )


int strtotime ( string $time [, int $now ] )




date函數,可以將第二個參數的timestamp以自訂的format輸出,若timestamp為空則輸出現在時間

time函數,返回一個從1970年1月1日0:00到現在的秒數,即為目前時間的timestamp值。

mktime函數,返回某一個日期的timestamp值,可用作時間的運算。
例:$hours_diff = strtotime("20:00:00")-strtotime("19:00:00");      echo "". date('h:i', $hours_diff);