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

PHPµÄÈÕÆÚʱ¼äº¯Êýdate()

PHPµÄÈÕÆÚʱ¼äº¯Êýdate()
1£¬Äê-ÔÂ-ÈÕ
echo date('Y-m-j');
2007-02-6
echo date('y-n-j');
07-2-6
´óдY±íʾÄêËÄλÊý×Ö£¬¶øСдy±íʾÄêµÄÁ½Î»Êý×Ö£»
Сдm±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼)£¬¶øСдnÔò±íʾ²»´øÇ°µ¼µÄÔ·ÝÊý×Ö¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-m-d');
2007-02-06
´óдM±íʾÔ·ݵÄ3¸öËõд×Ö·û£¬¶øСдmÔò±íʾÔ·ݵÄÊý×Ö(´øÇ°µ¼0);
ûÓдóдµÄJ£¬Ö»ÓÐСдj±íʾÔ·ݵÄÈÕÆÚ£¬ÎÞÇ°µ¼o£»ÈôÐèÒªÔ·ݴøÇ°µ¼ÔòʹÓÃСдd¡£
echo date('Y-M-j');
2007-Feb-6
echo date('Y-F-jS');
2007-February-6th
´óдM±íʾÔ·ݵÄ3¸öËõд×Ö·û£¬¶ø´óдF±íʾÔ·ݵÄÓ¢ÎÄȫд¡£(ûÓÐСдf)
´óдS±íʾÈÕÆڵĺó׺£¬±ÈÈç“st”¡¢“nd”¡¢“rd”ºÍ“th”£¬¾ßÌå¿´ÈÕÆÚÊý×ÖΪºÎ¡£
С½á£º
±íʾÄê¿ÉÒÔÓôóдµÄYºÍСдy;
±íʾÔ¿ÉÒÔÓôóдF¡¢´óдM¡¢Ð¡Ð´mºÍСдn(·Ö±ð±íʾ×Ö·ûºÍÊý×ÖµÄÁ½ÖÖ·½Ê½);
±íʾÈÕ¿ÉÒÔÓÃСдdºÍСдj£¬´óдS±íʾÈÕÆڵĺó׺¡£
2£¬Ê±:·Ö:Ãë
ĬÈÏÇé¿öÏ£¬PHP½âÊÍÏÔʾµÄʱ¼äΪ“¸ñÁÖÍþÖαê׼ʱ¼ä”£¬ÓëÎÒÃDZ¾µØµÄʱ¼äÏà²î8¸öСʱ¡£
echo date('g:i:s a');
5:56:57 am
echo date('h:i:s A');
05:56:57 AM
Сдg±íʾ12СʱÖÆ£¬ÎÞÇ°µ¼0£¬¶øСдhÔò±íʾÓÐÇ°µ¼0µÄ12СʱÖÆ¡£
µ±Ê¹ÓÃ12СʱÖÆʱÐèÒª±íÃ÷ÉÏÏÂÎ磬Сдa±íʾСдµÄ“am”ºÍ“pm”£¬´óдA±íʾ´óдµÄ“AM”ºÍ“PM”¡£
echo date('G:i:s');
14:02:26
´óдG±íʾ24СʱÖƵÄСʱÊý£¬µ«ÊDz»´øÇ°µ¼µÄ£»Ê¹ÓôóдµÄH±íʾ´øÇ°µ¼µÄ24СʱÖÆСʱÊý
С½á£º
×Öĸg±íʾСʱ²»´øÇ°µ¼£¬×Öĸh±íʾСʱ´øÇ°µ¼£»
Сдg¡¢h±íʾ12СʱÖÆ£¬´óдG¡¢H±íʾ24СʱÖÆ¡£
3£¬ÈòÄê¡¢ÐÇÆÚ¡¢Ìì
echo date('L');
½ñÄêÊÇ·ñÈòÄ꣺0
echo date('l');
½ñÌìÊÇ£ºTuesday
echo date('D');
½ñÌìÊÇ£ºTue
´óдL±íʾÅжϽñÄêÊÇ·ñÈòÄ꣬²¼¶ûÖµ£¬ÎªÕæ·µ»Ø1£¬·ñÔòΪ0£»
Сдl±íʾµ±ÌìÊÇÐÇÆÚ¼¸µÄÓ¢ÎÄȫд(Tuesday)£»
¶øʹÓôóдD±íʾÐÇÆÚ¼¸µÄ3¸ö×Ö·ûËõд(Tue)¡£
echo date('w');
½ñÌìÐÇÆÚ£º2
echo date('W');
±¾ÖÜÊÇÈ«ÄêÖÐµÄµÚ 06 ÖÜ
Сдw±íʾÐÇÆÚ¼¸£¬Êý×ÖÐÎʽ±íʾ
´óдW±íʾһÄêÖеÄÐÇÆÚÊý
echo date('t');
±¾ÔÂÊÇ 28 Ìì
echo date('z');
½ñÌìÊǽñÄêµÄµÚ 36 Ìì
Сдt±íʾµ±Ç°Ô·ÝÓÖ¶àÉÙÌì
Сдz±íʾ½ñÌìÊDZ¾ÄêÖеڼ¸Ìì
4£¬ÆäËû
echo date('T');
UTC
´óдT±íʾ·þÎñÆ÷µÄʱ¼äÇøÓòÉèÖÃ


Ïà¹ØÎĵµ£º

phpºÍjavaÉÏ´«ÎļþµÄ·½·¨

javaÉÏ´«Îļþ
ÐèÒªµÄµÚÈý·½jar°üÓУ¨ÕâÀïʹÓÃapacheµÄ£©
apacheµÄcommons-fileupload£¨ÉÏ´«Óã©£¬commons-io £¨listenerÇåÀíÀàÓã© £¬ commons-beanutils£¨¿ÉÑ¡£©
¾ßÌå²Ù×÷
FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
if(ServletFileUp ......

php sessionÐÂÊÖÈëÃŽ̳Ì

 
Session¼ò½é
session ·Ö³ÉÁ½²¿·Ö£¬session¿Õ¼ä´æ·ÅÓÚ·þÎñÆ÷¶Ë£¬´ò¿ª¿Õ¼äµÄID ´æ·ÅÓÚ ¿Í»§¶ËµÄcookie£¬ Èç¹û¿Í»§¶Ë¹Ø±ÕÁËcookie£¬session¾Í²»ÄÜÕý³£µÄʹÓá£
SessionµÄÖÐÎÄÒëÃû½Ð×ö“»á»°”£¬Æä±¾À´µÄº¬ÒåÊÇÖ¸ÓÐʼÓÐÖÕµÄһϵÁж¯×÷/ÏûÏ¢£¬±ÈÈç´òµç»°Ê±´ÓÄÃÆðµç»°²¦ºÅµ½¹Ò¶Ïµç»°ÕâÖмäµÄһϵÁйý³Ì¿ÉÒÔ³Æ ......

[ת]PHP ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È


PHP ÖÐÇÉÓÃÊý×é½µµÍ³ÌÐòµÄʱ¼ä¸´ÔÓ¶È
 
 
 
±¾ÎÄÖ÷ÒªÊǽéÉÜÔÚ PHP µÄ±à³ÌÖУ¬ÈçºÎÇÉÓÃÊý×éÀ´½µµÍÒò¶à²ãÑ­»·¶øÒýÆðµÄʱ¼ä¸´ÔӶȵÄÎÊÌâ¡£ÌرðÊǵ±³ÌÐòÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»¥Ê±£¬Óô˷½·¨À´ÓÅ»¯ÄãµÄ´úÂ룬½«»á´ø¸øÒâÏë²»µ½µÄЧ¹û¡£
ͨ³£¿ª·¢ÈËÔ±ÔÚд³ÌÐòµÄʱºò£¬ÍùÍùÊÇ°ÑÒѾ­Éè¼ÆºÃ»òÕß¹¹Ë¼ºÃµÄÔËËãÂß¼­£ ......

²»´íµÄphp·Ö²¼Àà

<?php
function genpage(&$sql,$page_size=10)
{
      global $pages,$sums,$eachpage,$page; //×ÜÒ³Êý£¬×ܼǼ£¬Ã¿Ò³Êý£¬µ±Ç°Ò³
      $page = $_GET["page"];
   if($page ==0)$page =1;
      $eachpage = $page_s ......

phpº¯Êýget_magic_quotes_gpcÏê½â

set_magic_quotes_runtimeÊÇÓÃÀ´ÉèÖÃPHP »·¾³ÅäÖõıäÁ¿ magic_quotes_runtime Öµ¡£
0-¹Ø±Õ 1-´ò¿ª
³ÌÐòÖмì²â״̬ÓÃget_magic_quotes_runtime,·µ»Ø 0 ±íʾ¹Ø±Õ±¾¹¦ÄÜ£»·µ»Ø 1 ±íʾ±¾¹¦ÄÜ´ò¿ª¡£Èô
magic_quotes_runtime ´ò¿ªÊ±£¬ËùÓÐÍⲿÒýÈëµÄÊý¾Ý¿â×ÊÁÏ»òÕßÎļþµÈµÈ¶¼»á×Ô¶¯×ªÎªº¬Óз´Ð±ÏßÒç³ö×Ö·ûµÄ×ÊÁÏ¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ