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

php dateʱ¼ä±¾µØ»¯ÎÊÌ⣨ת£©


½ñÌìÔÚдһ¸ö¶«Î÷ʱ£¬·¢ÏÖʱ¼äÒ»Ö±¶Ô²»ÉÏ£¬date("Y-m-d h:i:s") ×ÜÊÇÓë·þÎñÆ÷ʱ¼ä²î¼¸¸öСʱ£®
Ô­À´´Óphp5.1.0¿ªÊ¼£¬php.iniÀï¼ÓÈëÁËdate.timezoneÕâ¸öÑ¡ÏĬÈÏÇé¿öÏÂÊǹرյÄ
Ò²¾ÍÊÇÏÔʾµÄʱ¼ä£¨ÎÞÂÛÓÃʲôphpÃüÁ¶¼ÊǸñÁÖÍþÖαê׼ʱ¼ä
ºÍÎÒÃǵÄʱ¼ä£¨±±¾©Ê±¼ä£©²îÁËÕýºÃ8¸öСʱ

½â¾ö·½Ê½:

Ò»¡¢ÔÚҳͷʹÓÃdate_default_timezone_set()ÉèÖÃÎÒµÄĬÈÏʱÇøΪ±±¾©Ê±¼ä
date_default_timezone_set('PRC');
echo date('Y-m-d H:i:s');
ʱ¼äºÍ·þÎñÆ÷µ±Ç°Ê±¼äÒ»ÑùÁË!!

¶þ¡¢ÐÞ¸Äphp.ini¡£
´ò¿ªphp5.ini²éÕÒdate.timezone È¥µôÇ°ÃæµÄ·ÖºÅ¡¡= ºóÃæ¼ÓXXX£¬ÖØÆôhttp·þÎñ£¨Èçapache2»òiisµÈ£©¼´¿É¡£
¹ØÓÚXXX£¬´ó½ÄڵؿÉÓõÄÖµÊÇ£ºAsia/Chongqing £¬Asia/Shanghai £¬Asia/Urumqi
£¨ÒÀ´ÎΪÖØÇ죬ÉϺ££¬ÎÚ³ľÆ룩¸Ų̂µØÇø¿ÉÓãºAsia/Macao £¬Asia/Hong_Kong £¬Asia/Taipei
£¨ÒÀ´ÎΪ°ÄÃÅ£¬Ïã¸Û£¬Ì¨±±£©
»¹ÓÐмÓÆ£ºAsia/Singapore
ÀÏÍâºÃÏñ°Ñ±±¾©Â©µ÷ÁË
ÆäËû¿ÉÓõÄÖµÊÇ£ºEtc/GMT-8 £¬Singapore £¬Hongkong £¬PRC
PRCÊÇʲô£¿PRCÊÇÖлªÈËÃñ¹²ºÍ¹ú°¡-_-
ÒÔÉ϶¼ÊÇ´Óphp¹Ù·½ËµÃ÷µµÀïÕûÀí³öÀ´µÄGMT£«8ÏÂÃæµÄµØÇø£¬¿ÉÄÜ»áÓÐÒÅ©¡£


Ïà¹ØÎĵµ£º

HTTPServiceÓëPHPͨÐÅ

ÔÚFlexÖÐÓÐ2¸öHTTPServiceÀ࣬ËüÃǵÄÍêÕû¼Ì³Ð·¾¶·Ö±ðÊÇmx.rpc.httpºÍmx.rpc.http.mxml,¿ÉÒÔ¿´³ömx.rpc.http.mxmlÊÇmx.rpc.httpµÄ×ÓÀà¡£mx.rpc.http.mxmlÖеÄhttpServiceÖ÷ÒªÊÇΪÁËMXML±êÇ©ÖÐʹÓÃHTTPService¶øÉèµÄ¡£mx.rpc.httpÊÇÔÚʹÓÃas½Å±¾½øÐвÙ×÷ʱʹÓᣵ±µ÷Óà HTTPService ¶ÔÏóµÄ send() ·½·¨Ê±£¬½«·¢³ö¶ÔÖ¸¶¨ URL ......

PHPħÊõ³£Á¿:__LINE__ __FILE__ __CLASS__

PHP ÏòËüÔËÐеÄÈκνű¾ÌṩÁË´óÁ¿µÄÔ¤¶¨Òå³£Á¿
¡£²»¹ýºÜ¶à³£Á¿¶¼ÊÇÓɲ»Í¬µÄÀ©Õ¹¿â¶¨ÒåµÄ£¬Ö»ÓÐÔÚ¼ÓÔØÁËÕâЩÀ©Õ¹¿âʱ²Å»á³öÏÖ£¬»òÕ߶¯Ì¬¼ÓÔغ󣬻òÕßÔÚ±àÒëʱÒѾ­°üÀ¨½øÈ¥ÁË¡£
ÓÐÎå¸öħÊõ³£Á¿¸ù¾ÝËüÃÇʹÓõÄλÖöø¸Ä±ä¡£ÀýÈç __LINE__
µÄÖµ¾ÍÒÀÀµÓÚËüÔڽű¾ÖÐËù´¦µÄÐÐÀ´¾ö¶¨¡£ÕâЩÌØÊâµÄ³£Á¿²»Çø·Ö´óСд£¬ÈçÏ£º
±í 13 ......

phpµÄstatic±äÁ¿×÷ÓÃÓò

¶ÔÓÚÔËÐÐÔÚapacheÀïµÄphpÓ¦ÓÃÀ´Ëµ£¬static±äÁ¿µÄ×÷ÓÃÓòÊÇÒ»´ÎhttpÇëÇó¡£
¿ÉÒÔͨ¹ýÒÔÏ´úÂë½øÐÐÑéÖ¤£º
<?php
# test.php
function test(){
     static $sss = 0;
     ++$sss;
     echo $sss;
}
test();
?>
·ÃÎÊ/test.php £¬¿ÉÒÔ¿´µ½£¬×ÜÊÇ ......

phpÖеÄheaderÓ÷¨

 header() is used to send raw HTTP headers. See the HTTP/1.1 specification for more information on HTTP headers.
ʹÓ÷¶Àý
·¶ÀýÒ»:
 <?PHP
Header("Location: http://www.phpchina.com";);
exit;//ÔÚÿ¸öÖض¨ÏòÖ®ºó¶¼±ØÐë¼ÓÉÏ“exit",±ÜÃâ·¢Éú´íÎóºó£¬¼ÌÐøÖ´ÐС£
?>
<?php
head ......

PHPÀà¿âÊÕ¼¯

ͼ±í¿â
ÏÂÃæµÄÀà¿â¿ÉÒÔÈÃÄãºÜ¼òµÄ´´½¨¸´ÔÓµÄͼ±íºÍͼƬ¡£µ±È»£¬ËüÃÇÐèÒªGD¿âµÄÖ§³Ö¡£
pChart - Ò»¸ö¿ÉÒÔ´´½¨Í³¼ÆͼµÄ¿â¡£
Libchart - ÕâÒ²ÊÇÒ»¸ö¼òµ¥µÄͳ¼Æͼ¿â¡£
JpGraph - Ò»¸öÃæÏò¶ÔÏóµÄͼƬ´´½¨Àà¡£
Open Flash Chart - ÕâÊÇÒ»¸ö»ùÓÚFlashµÄͳ¼Æͼ¡£
RSS ½âÎö
½âÊÍRSS²¢ÊÇÒ»¼þºÜµ¥µ÷µÄÊÂÇé£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ