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

ÈçºÎ½«php»ñµÃµÄʱ¼äת»»Îª±±¾©Ê±¼ä

´Óphp5.10¿ªÊ¼£¬phpÖмÓÈëÁËʱÇøµÄÉèÖã¬ÔÚphpÖÐÏÔʾµÄʱ¼ä¶¼ÊǸñÁÖÍþÖαê׼ʱ¼ä£¬Õâ¾ÍÔì³ÉÁËÎÒÃÇÖйúµÄÓû§»á²î°Ë¸öСʱµÄÎÊÌ⣡
Ïà¹ØÉèÖÃÊÇÐÞ¸Äphp.iniÖÐµÄ date.timezone ²ÎÊý£º
[Date]
; Defines the default timezone used by the date functions
;date.timezone =
ĬÈÏÊǹرյģ¬Ö»Ðè°Ñ×¢ÊÍÈ¥µô£¬¸ÄΪ¼´¿É
[Date]
; Defines the default timezone used by the date functions
date.timezone = PRC
ÆäÖÐPRCÊÇ“ÖлªÈËÃñ¹²ºÍ¹ú”£¡
ÆäËûÑ¡Ïî¿ÉÒԲο¼phpÊֲᡣ
²»¹ýÕâÉÏÃæµÄÑÇÖÞµØÇø©µôÁËÎÒÃǵÄÊ׶¼±±¾©£¬²»ÖªµÀÀÏÍâÊDz»ÊǹÊÒâµÄ£¡
Èç¹ûûÓÐÐÞ¸Äphp.iniµÄȨÏÞ£¬Ö»ÐèÒªÔÚµ÷ÓÃʱ¼äÈÕÆÚº¯ÊýµÄʱºò£¬µ÷Óà date_default_timezone_set(’PRC’) ¼´¿É£¡
Ò²¿ÉÒÔµ÷ÓÃdate_default_timezone_get()À´²é¿´µ±Ç°µÄʱÇøÉèÖã¡
關ì¶XXX£¬´ó陸內µØ¿ÉÓõÄÖµÊÇ£º
Asia/Chongqing £¬Asia/Shanghai £¬Asia/Urumqi £¨ÒÀ´Î為ÖØ慶£¬ÉϺ££¬烏魯ľ齊)
¸Ų̂µØ區¿ÉÓãºAsia/Macao £¬Asia/Hong_Kong £¬Asia/Taipei £¨ÒÀ´Î為°Ä門£¬Ïã¸Û£¬Ì¨±±£©
̨灣µØÇø¿É設為£ºdate.timezone = "Asia//Taipei"
還ÓÐмÓÆ£ºAsia/Singapore
PHP5ÖеÄʱ¼äÏà²î°ËСʱµÄ½â¾ö°ì·¨
°²×°ºÃphp5ºó£¬ÔÚÂÛ̳²»¾­Òâ¼ä£¬ÔÚÂÛ̳ÉÏ¿´µ½ÓÐÈË˵php5.1.2µÄʱ¼äÏÔʾÕûÕûÉÙ8¸öСʱ£¬
<?php
    echo date("Y-m-d H:i:s");
?>
½á¹û×Ô¼º²âÊÔ¹ûÈ»ÊÇÏà²î8Сʱ¡£
  
   ºóÀ´¾­¹ýÔÚÂÛ̳ÉÏÕÒ×ÊÁÏ£¬½á¹ûÖÕÓÚ½â¾ö£¬ÔÚphp5ÒÔ¼°ÆðÒÔÉϵİ汾£¬ÒªÊä³ö±¾µØµÄʱ¼ä£¨ÏÞÖйú£©£¬¿ÉÒÔÕâôд´úÂ룺
<?php
   date_default_timezone_set('Asia/Shanghai');
   echo date('Y-m-d H:i:s');
?>
Ò²¿ÉÒÔÕâÑùд´úÂë:
<?php
   date_default_timezone_set('Asia/Chongqing');
   echo date('Y-m-d H:i:s');
?>
  
ÕâÑù ʱ¼äÏà²î°ËСʱµÄÎÊÌâ¾Í½â¾öÁË!!~~~


Ïà¹ØÎĵµ£º

£Ûת£ÝPHP·ÖÒ³ÏÔʾÖÆ×÷Ïêϸ½²½â


<!--
/* Font Definitions */
@font-face
{font-family:ËÎÌå;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@ËÎÌå" ......

windows7Ï°²×°apache+php+mysqlÎÊÌâ¼Ç¼

×î½üÐÂÂòÁ˸öµçÄÔ£¬ÏµÍ³ÊÇwindows7£¬window7ÔÚ½çÃ棬¹¦ÄÜ·½Ã涼ͦÈÃÈËÂúÒâµÄ£¬¸Ð¾õºÜˬ£¬²»Ë¬µÄÊÇÓÖÒªÖØа²×°»·¾³ÁË¡£
ËùÓÐÈí¼þ¾ù°²×°ÔÚF:\server\ÏÂ
apacheĿ¼£ºF:\server\apache2.2
phpĿ¼£ºF:\server\php
msyqlĿ¼£ºF:\server\mysql
Ò»¡¢°²×°apache
°²×°apacheµÄ°æ±¾ÊÇ£ºhttpd-2.2.15-win32-x86-no_ssl.msi
° ......

Linux ÏÂphpµÄ°²×°

»·¾³Èí¼þ°æ±¾½éÉÜ£º
 
   APACHE 2.0.59
   PHP5.2.3
   MYSQL5.0.45
   GD-2.0.35
   Zend Optimizer v3.3.0
  
                     ......

phpÕýÔòȡǶÌ×html±êÇ©

<?php
$s = <<<html
<html>
<head>
<title>nested tag test</title>
<mce:script type="text/javascript"><!--
alert('fdsafdasfasd');
// --></mce:script>
</head>
<body>
<div id=0>
<div id=1><img name="im ......

ѸËÙѧ»áPHP¼ÓÃܽâÃܼ¼ÇÉ

Ïл°ÉÙ˵,ÏȽ«ËüÃÇ´ò°ü³ÉÒ»¸öÎļþ¾Í½Ðfun.php°É
< ?php  
function passport_encrypt($txt, $key) {  
srand((double)microtime() * 1000000);  
$encrypt_key = md5(rand(0, 32000));  
$ctr = 0;  
$tmp = ''; ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ