Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

php ʱ¼äת»¯º¯ÊýʵÀý

phpÖÐÈÕÆÚת»»º¯ÊýstrtotimeµÄÓ÷¨:
Óï·¨:
int strtotime ( string time [, int now] )
·µ»Ø½«ÈκÎÓ¢ÎÄÎı¾µÄÈÕÆÚʱ¼äÃèÊö½âÎöΪ Unix ʱ¼ä´Á
ʵÀý:
Ò»£¬»ñÈ¡Ö¸¶¨ÈÕÆÚµÄunixʱ¼ä´Á strtotime("2009-1-22") ʾÀýÈçÏ£º
echo strtotime("2009-1-22") ½á¹û£º1232553600
˵Ã÷£º·µ»Ø2009Äê1ÔÂ22ÈÕ0µã0·Ö0Ãëʱ¼ä´Á
¶þ£¬»ñÈ¡Ó¢ÎÄÎı¾ÈÕÆÚʱ¼ä ʾÀýÈçÏ£º
±ãÓڱȽϣ¬Ê¹ÓÃdate½«µ±Ê±¼ä´ÁÓëÖ¸¶¨Ê±¼ä´Áת»»³Éϵͳʱ¼ä
(1)´òÓ¡Ã÷Ìì´ËʱµÄʱ¼ä´Ástrtotime("+1 day")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("+1 day")) ½á¹û£º2009-01-23 09:40:25
(2)´òÓ¡×òÌì´ËʱµÄʱ¼ä´Ástrtotime("-1 day")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("-1 day")) ½á¹û£º2009-01-21 09:40:25
(3)´òӡϸöÐÇÆÚ´ËʱµÄʱ¼ä´Ástrtotime("+1 week")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("+1 week")) ½á¹û£º2009-01-29 09:40:25
(4)´òÓ¡ÉϸöÐÇÆÚ´ËʱµÄʱ¼ä´Ástrtotime("-1 week")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("-1 week")) ½á¹û£º2009-01-15 09:40:25
(5)´òÓ¡Ö¸¶¨ÏÂÐÇÆÚ¼¸µÄʱ¼ä´Ástrtotime("next Thursday")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("next Thursday")) ½á¹û£º2009-01-29 00:00:00
(6)´òÓ¡Ö¸¶¨ÉÏÐÇÆÚ¼¸µÄʱ¼ä´Ástrtotime("last Thursday")
µ±Ç°Ê±¼ä£ºecho date("Y-m-d H:i:s",time()) ½á¹û£º2009-01-22 09:40:25
Ö¸¶¨Ê±¼ä£ºecho date("Y-m-d H:i:s",strtotime("last Thursday")) ½á¹û£º2009-01-15 00:00:00
ÒÔÉÏʾÀý¿ÉÖª£¬strtotimeÄܽ«ÈκÎÓ¢ÎÄÎı¾µÄÈÕÆÚʱ¼äÃèÊö½âÎöΪUnixʱ¼ä´Á£¬ÎÒÃǽáºÏmktime()»òdate()¸ñʽ»¯ÈÕÆÚʱ¼ä»ñÈ¡Ö¸¶¨µÄʱ¼ä´Á£¬ÊµÏÖËùÐè


Ïà¹ØÎĵµ£º

[תÔØ]PHP ¼ÆËãʱ¼ä²î

ÎÒÃdz£³£ÔÚÍøÕ¾ÉÏ¿´µ½Ä³ÆªÎÄÕ·¢±íÓÚ“3ÌìÇ°”£¬“5¸öÔÂÇ°”£¬“4ÄêÇ°”¡£ÏÂÃæÕâ¸öº¯Êý¾ÍÌṩÁ˼ÆËãÕâ¸öʱ¼ä²îµÄ¹¦ÄÜ¡£
<?php
/**
* ʱ¼ä²î¼ÆËã
*
* @param Timestamp $time
* @return String Time Elapsed
* @author Shelley Shyan
* @copyright http://phparch.cn (Professiona ......

PHP»º´æ¼¼Êõ£ºmemcacheº¯ÊýÏê½âÖ®Ò»

Memcacheº¯Êý¿âÊÇÔÚPECL(PHP Extension Community Library)ÖУ¬Ö÷Òª×÷ÓÃÊǴ´óÈÝÁ¿µÄÄÚ´æÊý¾ÝµÄÁÙʱ´æ·ÅÇøÓò£¬ÔÚ·Ö²¼Ê½µÄʱºò×÷ÓÃÌåÏֵķdz£Ã÷ÏÔ£¬·ñÔò²»½¨ÒéʹÓá£
memcacheº¯ÊýËùÓеķ½·¨ÁбíÈçÏ£º
²Î¿¼http://www.php.net/manual/zh/function.Memcache-add.php
Memcache::add - Ìí¼ÓÒ»¸öÖµ£¬Èç¹ûÒѾ­´æÔÚ£¬Ôò·µ»Øf ......

ͶÈëµÄphpµÄ»³±§

 Ô­À´ÊÇѧjspµÄ£¬µ«ÊǸоõjspÌ«ÄÑÁË£¬¶øÇÒ·¢ÏÖ£¬ÏÖÔڱȽÏÁ÷ÐÐphpÁË£¬php+mysqlµÄ»Æ½ð´îµµ¡£
 ¿´jspµÄÊéʱ£¬ÊéÉÏ˵£¬jsp±ÈphpºÃ£¬ÏÖÔÚ¿´phpµÄÊ飬˵php±ÈjspºÃ£¬ÎÒÏëÕâÒ²ÊÇÖÇÕß¼ûÖÇ£¬ÈÊÕß¼ûÈÊ°É¡£
 ÇìÐÒ×Ô¼ºÑ§php·¢ÏÖÁËÒ»±¾ºÃÊ飬ÍƼö¸ø´ó¼Ò£¬¾ÍÊǽ²µÄºÜÏêϸ¡£
 Ó¢ÎÄÃû¡¶PHP and MySQL EXAMPLE¡· ÃÀ¹ ......

ÀûÓÃmemcachedÔÚ¶ą̀·þÎñÆ÷Ö®¼ä¹²ÏíPHPµÄsessionÊý¾Ý

×î½üÎҵļ¸ÆªÎÄÕ¶¼ÊÇÊÇ×î½üÏîÄ¿µÄÒ»µãÐĵÃ^^
Õâ¸öÏîÄ¿Ò»¿ªÊ¼¾ÍÉè¼ÆµÄ“ºÜ´ó”£¬¿¼ÂÇÁ˺ฺܶÔؾùºâ·½ÃæµÄ¶«Î÷£¬±ÈÈç²ÉÓÃnginx½«phpµÄÇëÇó·Ö̯µ½Èô¸É¸öÔËÐÐphp fastcgiµÄ¶ÀÁ¢·þÎñÆ÷ÖС£ÕâÑùµÄÉè¼Æ³ýÁËÔÚÿ¸öphp fastcgi·þÎñÆ÷ÖÐÒª±£´æÒ»·Ý³ÌÐòµÄ¿½±´ÒÔÍ⣬»¹ÓÐÒ»¸öؽ´ý½â¾öµÄÎÊÌâ¡£ÓÉÓÚphp fastcgi½ø³Ì·Ö±ðÔËÐÐÔ ......

PHP ÅúÁ¿É¾³ýÊý¾ÝµÄ·½·¨

 HTML´úÂë
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_D ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ