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

phpʵÏÖÍøÒ³¼ÆÊý£¨¶ÁдÎļþ£©

 ·Ã¿Í¼ÆÊýÆ÷µÄÁ÷³ÌÈçÏÂ
µÚһλÓû§ä¯ÀÀijҳ¡£
·þÎñÆ÷³ÌÐò´ÓÊý¾Ý¿â»òÎļþÖжÁÈ¡¸ÃÒ³±»ä¯ÀÀ´ÎÊý¡£
½«´ÎÊý¼ÓÒ»´¢´æ£¬²¢½«ËüËͻصÚһλÓû§¡£
µÚ¶þλÓû§ä¯ÀÀijҳ¡£
·þÎñÆ÷³ÌÐò´ÓÊý¾Ý¿â»òÎļþÖжÁÈ¡¸ÃÒ³±»ä¯ÀÀ´ÎÊý¡£
½«´ÎÊýÔÙ¼ÓÒ»´¢´æ£¬²¢½«ËüËͻصڶþλÓû§¡£
<?php
$filename="./visit";
$handle=fopen($filename,"r+");
$visit =intval(@fread($handle,20));
$handle=fopen($filename,"w+");
fwrite($handle,++$visit);
$len=strlen($str=strval($visit));
for($i=0;$i<$len;$i++) { 
 echo "document.write('<img src=\"images/{$str[$i]}.gif\">');";
}
?>
ÁíÍ⻹ÓÐÒ»ÖÖ·½·¨ÊÇ£º
function MyCounter() {
  $counterFile="/tmp".$GLOBALS["PHP_SELF"];
  if (!file_exists($counterFile)) {
    if (!file_exists(dirname($counterFile))) {
      mkdir(dirname($counterFile), 0700);
    }
    exec("echo 0 > $counterFile");
  }
  $fp = fopen($counterFile,"rw");
  $num = fgets($fp,5);
  $num += 1;
  print "$num";
  echo $counterFile;
  exec("rm -rf $counterFile");
  exec("echo $num > $counterFile");
}
?>
²»¹ýÎÒ¶ÔÕâÖÖ·½·¨¸ü¼Ó»³ÒÉ£¬ÒòΪɾ³ýÎļþµÄ»°ÎÒµ£ÐÄ»á³öÏÖ²¢·¢ÎÊÌ⣬¼ÙÏë²¢·¢Á¿ºÜ´óʱ£¬»á²»»á³öÏÖ
  if (!file_exists($counterFile)) {
exec("echo 0 > $counterFile");
  }
Ôì³É¼ÆÊýÇå³þÇå0ÁËÄØ£¿


Ïà¹ØÎĵµ£º

Ê®Ììѧ»áphpÖ®µÚÁùÌì

 
¡¡¡¡Ñ§Ï°Ä¿µÄ£ºÑ§»áÌí¼Óɾ³ýÐÞ¸ÄÊý¾Ý
¡¡¡¡mysql_query($exec);
¡¡¡¡µ¥Õâ¸öÓï¾ä¾Í¿ÉÒÔÖ´ÐÐËùÓеIJÙ×÷ÁË£¬²»Í¬µÄ¾ÍÊÇ$execÕâ¸ösqlÓï¾ä
¡¡¡¡Ìí¼Ó£º$exec="insert into tablename (item1,item2) values ('".$_POST['item1']."',".$_POST['item1'].")";
¡¡¡¡É¾³ý£º$exec="delete from tablename where...";
¡¡¡¡ÐÞ¸ ......

phpÐÂÎÅÄÚÈÝ·ÖҳʵÀý£¨smarty Ä£°å£©

ÏîÄ¿ÐèÒªÓõ½ ÐÂÎÅÄÚÈÝÒ³ ʵÏÖ·ÖÒ³¹¦ÄÜ£¬Ëæ±ãдÁËһϡ£
¸ø´ó¼Ò×ö¸ö²Î¿¼£¬Ð´µÄ²»ºÃ»¹ÍûÁ½Ⱑ£¡
//ÐÂÎÅÄÚÈÝ·ÖÒ³¿ªÊ¼ The page next for news content start
$nextpage="<!--{nextpage}-->";//·ÖÒ³±êʾ.
$content=explode($nextpage,$content);
$sum=count($content);
$mpurl=$_SERVER['PHP_SELF']."?newsid ......

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý2008

phpÖУ¬¹ØÓÚÕû³ýµÄ3¸öº¯Êý
2008-10-23 23:25
Ceil: ¼ÆËã´óÓÚÖ¸¶¨ÊýµÄ×îСÕûÊý¡£
Floor: ¼ÆËãСÓÚÖ¸¶¨ÊýµÄ×î´óÕûÊý¡£
round: ËÄÉáÎåÈë¡£
¸ù¾ÝÐèҪѡÓÃ
<?php
$a=20;
$b = 6;
echo ($a/$b)."<br>"; //out 3.3333333333333
echo ceil($a/$b)."<br>"; //out 4
echo floor($a/$b)."<br> ......

phpÀ©Õ¹°²×°soapÄ£¿é





Ê×ÏÈ°²×°Íêphp
ºó×îºÃ±£Áôµ±Ê±°²×°µÄÎļþ£¬±ÈÈçÎҵķ¾¶/export1/soft
#cd php-5.2.8/ext/soap
#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config
--enable-soap
#make
#make install

±àÒëºóµÄsoap.so
Îļþ± ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ