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

php »ñµÃ ¾«È· ʱ¼ä ÓÐÒâ˼¡«£¡£¡¡«¡«£¡

/**
*
* @param <type> $format
* @param <type> $utimestamp
* @return <type>
* @example
*
* echo udate('H:i:s.u'); 19:31:28.7812
*
* echo udate('H:i:s.uuuu'); 19:31:28.78127781277812778127
*
* echo udate('Y-M-D H:i:s.u'); 2010-Apr-Thu 19:40:49.484376
*
* echo udate('Y-m-d H:i:s.u'); 2010-04-22 20:20:32.453127
*
* echo date("Ymd").udate('Hisu'); 20100422201737484376
*
* echo date("Ymd").udate('Hisuu'); 20100422201926156251156251
*
* @author wulei
* @date
*
*/
function udate($format, $utimestamp = null)
{
if (is_null($utimestamp))
$utimestamp = microtime(true);
$timestamp = floor($utimestamp);
$milliseconds = round(($utimestamp - $timestamp) * 1000000);
return date(preg_replace('`(?<!\\\\)u`', $milliseconds, $format), $timestamp);


Ïà¹ØÎĵµ£º

php ³ÌÐòÔËÐÐʱ¼ä ¼ÆËã

/**
* »ñµÃµ±Ç°Ê±¼äµÄºÁÃëÊý£¬Óû§¼ì²âÒ³ÃæµÄÖ´ÐÐʱ¼ä
*
* @author cjz
* @date Thu Apr 09 15:05:55 CST 2009
*
* @return float(ºÁÃëÊý)
*/
function myGetMicrotime()
{
list($usec,$sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
  ......

MemcachedÖÐPerlÐòÁл¯´æ´¢µÄ¶ÔÏóPHPÎÞ·¨¶ÁÈ¡µÄ½â¾ö

Perl MemcachedµÄ¿Í»§¶ËÐòÁл¯¶ÔÏó²ÉÓõÄÊÇStorableÄ£¿éµÄnfreeze·½·¨£¬¶øÕâ¸ö·½·¨ÓÖµ÷ÓÃÁËcÀ©Õ¹µÄdo_store·½·¨£»·´ÐòÁл¯Ê¹ÓõÄÊÇStorableÄ£¿éµÄthaw·½·¨£¬¶øÕâ¸ö·½·¨ÓÖÊǵ÷ÓõÄcÀ©Õ¹µÄdo_retrieve·½·¨¡£
¶øÔÚPHPÖУ¬½øÐеÄÈ´ÊÇserializeºÍunserialize²Ù×÷¡£Ôì³ÉÁËÎÞ·¨Õý³£¶ÁÈ¡µÄ½á¹û¡£
Perl´æ´¢Ò»¸ö('a', 'c')Êý×éµÄÒýÓ ......

PHPÉú³ÉÊý¾ÝÁ÷GIFºÍPNG͸Ã÷ͼÐÎ


<?php
header("content-type:image/png");
$img=ImageCreate(100,35);
$bgcolor=ImageColorAllocate($img,0,0,0);
$red=ImageColorAllocate($img,255,0,0);
$bgcolortrans=ImageColorTransparent($img,$bgcolor);
ImageString($img,5,10,10,"PNG PHP",$red);
ImagePng($img);
ImageDestro ......

PHPÓʼþÊÕ·¢£¬ºÍ±àÂëÎÊÌâ¡£Êý¾ÝÆ¥Åä

<?php
header("content-type:text/html; charset=UTF-8");
/*
 * record kid words and insert into database
 * user by sending email to publication kid words
 *
 */
include 'POP3.php';
include 'email_class.php';
include 'Mail_mimeDecode.php';
//include 'include/compatible ......

PHP»º´æÊµÏÖ


<?php  
class
 CacheException 
extends
 Exception {}  
/**
 
 * »º´æ³éÏóÀà
 
 */
  
abstract
 
class
 Cache_Abstract {  
    /**
 
   &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ