¼òµ¥µÄ¼ÆËãphpÒ³Ãæ´¦Àíʱ¼ä
<?php
function getmicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
//Àý×Ó
//¿ªÊ¼
$time_start = getmicrotime();
//ÕâÀï·ÅÄãµÄ´úÂë
//½áÊø
$time_end = getmicrotime();
$time = $time_end - $time_start;
echo "Did nothing in $time seconds"; //Êä³öÔËÐÐ×Üʱ¼ä
?>
Ïà¹ØÎĵµ£º
PHPÊÇÒ»ÖÖÓÃÓÚ´´½¨¶¯Ì¬WEBÒ³ÃæµÄ·þÎñ¶Ë½Å±¾ÓïÑÔ¡£ÈçͬASPºÍColdFusion£¬Óû§¿ÉÒÔ»ìºÏʹÓÃPHPºÍHTML±àдWEBÒ³Ã棬µ±·ÃÎÊÕßä¯ÀÀµ½¸ÃÒ³Ãæʱ£¬·þÎñ¶Ë»áÊ×ÏȶÔÒ³ÃæÖеÄPHPÃüÁî½øÐд¦Àí£¬È»ºó°Ñ´¦ÀíºóµÄ½á¹ûÁ¬Í¬HTMLÄÚÈÝÒ»Æð´«Ë͵½·ÃÎʶ˵Ää¯ÀÀÆ÷¡£µ«ÊÇÓëASP»ò
ColdFusion²»Í¬£¬PHPÊÇÒ»ÖÖÔ´´úÂ뿪·Å³ÌÐò£¬ÓµÓкܺõĿçƽ̨¼æÈÝÐ ......
1¡¢Ä£°åµÄÓÉÀ´
ÔÚûÓÐÄ£°å¼¼Êõ֮ǰ£¬Ê¹ÓÃPHP¿ª·¢³ÌÐò£¬Í¨³£¶¼ÊÇphp´úÂëºÍhtml»ì±àÔÚÒ»Æð¡£±ÈÈç˵ÐÂÎÅÁÐ±í£¬ºÜ¿ÉÄܾÍÊÇÒ»¸önewslist.phpÒ³Ã棬½á¹¹ÈçÏ£º
<?
//´ÓÊý¾Ý¿âÖжÁÈ¡³öÒªÏÔʾµÄÐÂÎżÇ¼
?>
<html>
<head>……..
</head>
<body>
<?
While ($news ......
×î½üÓÃwin7ÁË£¬ÅªÁ˸ö¼¤»îÂ룬Ҳ²»ÖªµÀÄÜÓõ½Ê²Ã´Ê±ºò£¬ÐÄÀï¶àÉÙÊÇÓеãÓÇÂǵģ¬Ã»¸öµ×£¬¹ÜËûµÄÄØ£¬ÏÖÔÚÄÜÓþÍÏÈÓÃ×Å£¬ÒÔǰҲûÍæÔõô¹ýVista£¬²»¹ý¸Ð¾õwin7½çÃæÉÏ»¹ÊÇÓеãÏñVistaµÄ£¬ÓÐЩ¹¦ÄÜÉÏÒ²²î²»¶à£¬²»¹ý¸Ð¾õÓÃÕâ¸öwin7»¹Õæ²»´í£¬ÎÒÒ²Ö»ÊÇÏà¶ÔXPµÄ¸Ð¾õ£¬µ±È»ÁË£¬win7µÄÓ²Å̿ռ䵹ÊÇÕ¼ÓÃÁ˲»ÀÏÉÙÎÒ19GµÄCÅÌ×°Íêºó¾Í»¹Ê£ ......
Ò»£º½á¹¹ºÍµ÷ÓÃ(ʵÀý»¯)£º
class className{} £¬µ÷Óãº$obj = new className();µ±ÀàÓй¹Ô캯Êýʱ£¬»¹Ó¦´«Èë²ÎÊý¡£Èç$obj = new className($v,$v2...);
¶þ£º¹¹Ô캯ÊýºÍÎö¹¹º¯Êý£º
1¡¢¹¹Ô캯ÊýÓÃÓÚ³õʼ»¯£ºÊ¹ÓÃ__construct()£¬¿É´ø²ÎÊý¡£
2¡¢µ«Îö¹¹º¯Êý²»ÄÜ´ø²ÎÊý£¨ÓÃÓÚÔÚÏúÈ¥Ò»¸öÀà֮ǰִÐÐһЩ²Ù×÷»ò¹¦ÄÜ£©¡£Îö¹¹º¯Êý ......