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

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±íʾ·þÎñÆ÷µÄʱ¼äÇøÓòÉèÖÃ
echo date('I');
0


Ïà¹ØÎĵµ£º

PHPº¯Êý£ºctype_digit

 (PHP 4 >= 4.0.4)
¹¦ÄÜ˵Ã÷£ºCheck for numeric character(s)
Description
bool ctype_digit ( string text)
Returns TRUE if every character in text is a decimal digit, FALSE otherwise.
Àý×Ó 1. A ctype_digit() example
<?php $strings = array('1820.20', '10002', 'wsl!12'); foreach ($strings ......

phpµ÷ÓÃmysql´æ´¢¹ý³Ì·µ»Ø¶à¸ö½á¹û¼¯µÄ´¦Àí

 ·µ»ØÒ»¸ö½á¹ûÈ«ÊÀ½ç¶¼ÖªµÀÔõô´¦Àí£¬¹Ø¼üÊÇ·µ»Ø¶à¸ö½á¹û¼¯¾Í²»ºÃ°ìÁË£¬ÏÂÃæÓÐÒ»½â¾ö°ì·¨
´æ´¢¹ý³Ì´úÂë
DELIMITER $$;
DROP PROCEDURE IF EXISTS `test`.`sp_test`$$
CREATE PROCEDURE `test`.`sp_test` ()
BEGIN
    select * from `user`.`user` limit 0, 50;
    select coun ......

phpÁôÑÔ°å

 1,Éè¼ÆÒ»¸ö³ÌÐòµÄÁ÷³Ì
Éè¼ÆÁ÷³Ì£º
¹¦ÄÜÐèÒª->Ò³ÃæÉè¼Æ->Êý¾Ý¿âÉè¼Æ->´úÂëÉè¼Æ->µ÷ÊÔ·¢²¼.
¿ªÊ¼³ÌÐò->³õʼ»¯->Ìõ¼þ->½áÊø;
2.heml±íµ¥±êÇ©µÄʹÓÃ:
<form action = "" method = "get">
<input type="test" size=10 name="user"/>
<input type="test" size=10 name="title"& ......

PHP·¾¶ÎÊÌâ

<?
php define('__TYPECHO_ROOT_DIR__', dirname(__FILE__));
define('__TYPECHO_PLUGIN_DIR__', '/usr/plugins');
@set_include_path(get_include_path() . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . '/var' . PATH_SEPARATOR . __TYPECHO_ROOT_DIR__ . __TYPECHO_PLUGIN_DIR__);
ÄÜÏêϸµÄ½âÊÍÕâ¸öº¯ÊýÂ𣿵±È»Î ......

PHP¶þάÊý×éÅÅÐò

 PHP±¾ÉíÊÇÓÐÒ»¸ö¶àάÊý×éÅÅÐòµÄº¯ÊýµÄ¡£
bool
array_multisort
( array
$ar1
[, mixed
$arg
[, mixed
$...
[, array
$...
]]] )
ÏÂÃæÊÇÊֲᵱÖжÔÓÚarray_multisortº¯ÊýµÄÃèÊö£º
array_multisort() ¿ÉÒÔÓÃÀ´Ò»´Î¶Ô¶à¸öÊý×é½øÐÐÅÅÐò£¬»òÕ߸ù¾Ýijһά»ò¶àά¶Ô¶àάÊý×é½øÐÐÅÅÐò¡£
¹ØÁª£¨string ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ