Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Éè¼Æģʽ

 
Ç°ÑÔ£ºÎÒдµÄ¹ØÓÚÉè¼ÆģʽµÄһϵÁÐÎÄÕ¡£ÕâϵÁеÄÎÄÕÂÖ÷ÒªÕë¶Ôû½Ó´¥¹ýÉè¼ÆģʽµÄ£¬»òÕß˵½Ó´¥¹ýµ«»¹²»ÊǺÜÃ÷°×µÄPHPer¡£
ÎÊÌâµÄÌá³ö:
¿ÉÄܺܶàÈ˶¼Ð´¹ýÀ࣬Îļþ²Ù×÷µÄ£¬Êý¾Ý¿âµÄ……
¶ÔÓÚÊý¾Ý¿âµÄÀàÀ´ËµÓÐʱºò¿ÉÄܱ»ºöÂÔµÄÒ»¸öÎÊÌâÊÇ£ºÎÒÃÇ´´½¨ÀàµÄʵÀýʱһ°ã¶¼ÊÇͨ¹ý¹¹Ô캯ÊýÁ¬½ÓÁËÊý¾Ý¿â¡£Õâû´ ......

phpͳ¼ÆIPÒÔ¼°ÔÚÏßÈËÊýµÄͳ¼Æ

    1.ÓÃJSµ÷ÓÃÎļþcount.php  ÔÚÄãÐèÒª¼ÓÈëͳ¼ÆµÄµÄµØ·½¼ÓÈë<script src="count.php"></script>  ʵ¼ÊÔËÓÃÖÐ×¢ÒâÐ޸ķ¾¶£¡
  
     2.php»·¾³±ØÐëÖ§³Öputenv()º¯Êý,¿ÉÒÔͳ¼Æ×òÈÕ·ÃÎÊ£¬½ñÈÕ·ÃÎÊ£¬ÔÚÏßÈËÊý,Äú·ÃÎʵĴÎÊý¡£
    3 . ......

Ubuntu 9.04 server°²×°nginx+php(fastcgi)

 
×¼±¸ÖªÊ¶£º
Ubuntu  :
 Ubuntu ÊÇlinuxµÄÒ»¸ö°æ±¾£¬ÓзÇÖÞ·¢²¼µÄ£¬ÏÖÔڱȽÏÁ÷ÐеÄÒ»¸ö°æ±¾¡£
²Î¿¼°Ù¶È˵Ã÷Ubuntu
nginx ¡¡£º
Nginx ("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ ·´Ïò´úÀí ·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ ......

ʹÓÃnginxÅäÖöà¸öphp fastcgi¸ºÔؾùºâ

ÅäÖû¹ÊǷdz£¼òµ¥µÄ£¬³ä·ÖÌåÏÖÁËnginxµÄÇ¿´óÓëÅäÖõļòµ¥^^ÏÂÃæÊÇ´óÖµķþÎñÆ÷½á¹¹Í¼£º
Ó¦ÓõÄ×îÇ°¶ËÊÇһ̨nginx·þÎñÆ÷£¬ËùÓо²Ì¬µÄÄÚÈݶ¼ÓÉnginxÀ´´¦Àí£¬¶ø½«ËùÓÐphpµÄÇëÇ󶼷Ö̯µ½ÏÂÓεÄÈô¸Ę́ÔËÐÐphp fastcgiÊØ»¤½ø³ÌµÄ·þÎñÆ÷ÖУ¬ÕâÑù¿ÉÒÔÒÔÒ»ÖÖÁ®¼ÛµÄ·½°¸À´ÊµÏÖ¶Ôϵͳ¸ºÔصķÖ̯£¬À©Õ¹ÏµÍ³µÄ¸ºÔØÄÜÁ¦¡£
Èý̨php fastc ......

PHPÖÐmagic_quotes_gpcµÄ×÷ÓÃ

ħÊõÒýÓ÷¢Éú×÷ÓÃÊÇÔÚ´«µÝ$_GET,$_POST,$_COOKIEʱ
1.
Ìõ¼þ£º magic_quotes_gpc=off
дÈëÊý¾Ý¿âµÄ×Ö·û´®Î´¾­¹ýÈκιýÂË´¦Àí¡£´ÓÊý¾Ý¿â¶Á³öµÄ×Ö·û´®Ò²Î´×÷Èκδ¦Àí¡£
Êý¾Ý£º  $data=”snow”’’sun” ; (snowºÍsunÖ®¼äÊÇËĸöÁ¬ÐøµÄµ¥ÒýºÅ).
²Ù×÷£º ½«×Ö·û´®:”snow”’& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ