Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : php

¹ØÓÚNginx+PHPµÄÐéÄâÖ÷»úĿ¼ȨÏÞ¿ØÖƵÄ̽¾¿

NginxµÄʹÓÃÕß×î½üÔ½À´Ô½¶à£¬ºÜ¶à´óÐÍÍøÕ¾Ò²¶¼´ÓApache»òÆäËûƽ̨ǨÒƵ½ÁËNginx¡£µ«ÔÚÎÒʹÓÃNginxµÄ¹ý³ÌÖÐÓиöÎÊÌâһֱδµÃµ½½â¾ö£¬¾ÍÊÇÈçºÎÏÞÖÆNginx+PHPµÄĿ¼ȨÏÞ
ÎÒÃÇÖªµÀ£¬ÔÚApacheÖпÉÒÔºÜÈÝÒ׵ĶÔÐéÄâĿ¼½øÐÐȨÏÞ¿ØÖÆ£¬È磺
<VirtualHost www.xpb.cn>
    ServerAdmin xiaopb@live.com
    DocumentRoot /usr/www/xpb/
    ServerName www.xpb.cn:80
    ServerAlias www.xpb.cn
    ErrorLog logs/default-error_log
    php_admin_value open_basedir "/tmp/:/usr/www/xpb/"
</VirtualHost>
¹Ø¼üÊǺóÃæµÄÕâ¾äphp_admin_value£¬ÕâÑù¾ÍÏÞÖÆÁËphpµÄ²Ù×÷Ŀ¼½öÏÞÓÚ/tmp/ºÍ/usr/www/xpb/ÕâÁ½¸öĿ¼ÁË¡£¶ÔÓÚ ApacheÐéÄâÖ÷»úÀ´Ëµ£¬Õâ¸öÉèÖÃÊ®·ÖÓÐÓ㬽áºÏÔÚphp.iniÖнûÓÃһЩphpº¯Êý£¬¼¸ºõ¿ÉÒԶžøPHPľÂí¶ÔÆäËûÕ¾µã¼°ÏµÍ³µÄΣº¦¡£ÎÒËäûרҵ×ö¹ýLinuxϵÄÐéÄâÖ÷»ú£¬µ«ÏàП÷´óÐéÄâÖ÷»úÉÌÒ²ÊÇÕâô×öµÄ¡£
    ¿´À´¶ÔÓÚApache×îºÃµÄ°ì·¨»¹ÊÇʹÓÓÔÚph ......

PHP DATE( )º¯ÊýÓëϵͳʱ¼ä²î8Сʱ½â¾ö°ì·¨

Ò»£¬Ô­Òò
´Óphp5.1.0¿ªÊ¼£¬php.iniÀï¼ÓÁËdate.timezoneÕâ¸öÑ¡Ï²¢ÇÒĬÈÏÇé¿öÏÂÊǹرյÄ
Ò²¾ÍÊÇÏÔʾµÄʱ¼ä£¨ÎÞÂÛÓÃʲôphpÃüÁ¶¼ÊǸñÁÖÍþÖαê׼ʱ¼ä
ºÍÎÒÃǵÄʱ¼ä£¨±±¾©Ê±¼ä£©²îÁËÕýºÃ8¸öСʱ¡£
¶þ£¬½â¾ö°ì·¨
·½·¨Ò»£ºÔÚ»ñȡʱ¼äÇ°¼ÓÈçÏ´úÂ룺
date_default_timezone_set(PRC);
·½·¨¶þ£º¸Äphp.iniÀïÃæµÄÅäÖÆ£¬¾ßÌå²Ù×÷ÈçÏ£º
´ò¿ªphp.ini²éÕÒdate.timezone È¥µôÇ°ÃæµÄ·ÖºÅ= ºóÃæ¼ÓXXX(PRC)£¬ÖØÆôhttp·þÎñ£¨Èçapache2»òiisµÈ£©¼´¿É
È磺date.timezone=PRC
¹ØÓÚXXX£¬´ó½ÄڵؿÉÓõÄÖµÊÇ£ºAsia/Chongqing £¬Asia/Shanghai £¬Asia/Urumqi £¬PRC£¨ÒÀ´ÎΪÖØÇ죬ÉϺ££¬ÎÚ³ľÆ룬ÖлªÈËÃñ¹²ºÍ¹ú£©
¸Ų̂µØÇø¿ÉÓãºAsia/Macao £¬Asia/Hong_Kong £¬Asia/Taipei £¨ÒÀ´ÎΪ°ÄÃÅ£¬Ïã¸Û£¬Ì¨±±£©
»¹ÓÐмÓÆ£ºAsia/Singapore
ÆäËü£ºEtc/GMT-8 £¬Singapore £¬Hongkong
·½·¨Èý£ºecho date("Y-m-d H:i:s", time()+8*60*60);
¸½£ºdateʱ¼ä¸ñʽ
date("Y-m-d H:i:s"); ÏÔʾµÄ¸ñʽ: Äê-ÔÂ-ÈÕ Ð¡Ê±:·ÖÖÓ:Ãë
Ïà¹Øʱ¼ä²ÎÊý:
a - "am" »òÊÇ "pm"
A - "AM" »òÊÇ "PM"
d - ¼¸ÈÕ£¬¶þλÊý×Ö£¬Èô²»×ã¶þλÔòÇ°Ãæ²¹Áã; È ......
×ܼǼÊý:2174; ×ÜÒ³Êý:363; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [354] [355] [356] [357] [358] [359] [360] [361] [362] 363  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ