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

phpµÄstatic±äÁ¿×÷ÓÃÓò

¶ÔÓÚÔËÐÐÔÚapacheÀïµÄphpÓ¦ÓÃÀ´Ëµ£¬static±äÁ¿µÄ×÷ÓÃÓòÊÇÒ»´ÎhttpÇëÇó¡£
¿ÉÒÔͨ¹ýÒÔÏ´úÂë½øÐÐÑéÖ¤£º
<?php
# test.php
function test(){
     static $sss = 0;
     ++$sss;
     echo $sss;
}
test();
?>
·ÃÎÊ/test.php £¬¿ÉÒÔ¿´µ½£¬×ÜÊÇecho³ö1¡£
ps£ºÉúÃüÓò»¹ÓУ¬Ò»¸öhttpÏß³ÌÖÜÆÚ£¬ÕâÖÖÈ«¾Ö±äÁ¿ÐèÒªÔÚphpÀ©Õ¹ÖÐÉùÃ÷¡£


Ïà¹ØÎĵµ£º

phpɾ³ýÎļþºÍÕû¸öÎļþ¼Ð

function delfile($dir)
{
if (is_dir($dir))
{
$dh=opendir($dir);
while (false !== ( $file = readdir ($dh)))
{
if($file!="." && $file!="..")
{
$fullpath=$dir."/".$file;
if(!is_dir($fullpath))
{
unlink($fullpath);
} ......

php·ÖÒ³

<?php
//·ÖÒ³
$link=mysql_connect("localhost","root","root");
$db=mysql_select_db("bustest",$link);
$res=mysql_query("select * from info");
//Ò»¹²¶àÉÙÌõ
$count=mysql_num_rows($res);
//ÿҳ5ÌõÐÅÏ¢
$perpage=5;
//Ò»¹²¶àÉÙÒ³
$pagecount=ceil($count/$perpage);
//´«¹ýÀ´µÄÒ³Êý
$pagenum=$_REQUE ......

LAMP(Linux+Apache+MySQL+PHP)·þÎñÆ÷µÄÐÔÄÜÓÅ»¯

Ä¿Ç°LAMP (Linux + Apache + MySQL + PHP) ½ü¼¸ÄêÀ´·¢Õ¹Ñ¸ËÙ£¬ÒѾ­³ÉΪWeb ·þÎñÆ÷µÄÊÂʵ±ê×¼¡£LAMP 
Õâ¸ö´ÊµÄÓÉÀ´×îÔçʼÓڵ¹úÔÓÖ¾“c't Magazine”£¬Michael KunzeÔÚ1990Äê×îÏÈ°ÑÕâЩÏîÄ¿×éºÏÔÚÒ»Æð´´ÔìÁËLAMPµÄËõд×Ö¡£ÕâЩ×é¼þËäÈ»²¢²»ÊÇ¿ª¿ªÊ¼¾ÍÉè¼ÆΪһÆðʹÓõģ¬µ«ÊÇ£¬ÕâЩ¿ªÔ´Èí¼þ¶¼¿ÉÒԺܷ½±ã µÄË ......

HTTPServiceÓëPHPͨÐÅ

ÔÚFlexÖÐÓÐ2¸öHTTPServiceÀ࣬ËüÃǵÄÍêÕû¼Ì³Ð·¾¶·Ö±ðÊÇmx.rpc.httpºÍmx.rpc.http.mxml,¿ÉÒÔ¿´³ömx.rpc.http.mxmlÊÇmx.rpc.httpµÄ×ÓÀà¡£mx.rpc.http.mxmlÖеÄhttpServiceÖ÷ÒªÊÇΪÁËMXML±êÇ©ÖÐʹÓÃHTTPService¶øÉèµÄ¡£mx.rpc.httpÊÇÔÚʹÓÃas½Å±¾½øÐвÙ×÷ʱʹÓᣵ±µ÷Óà HTTPService ¶ÔÏóµÄ send() ·½·¨Ê±£¬½«·¢³ö¶ÔÖ¸¶¨ URL ......

PHPÖеÄstristr()£¬strstr()£¬strpos()ËٶȱȽÏ


PHPÖеÄstristr()£¬strstr()£¬strpos()ËٶȱȽÏ

²âËÙ´úÂë:

<?php
function getmicrotime()
{
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ