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

php²âÊÔÓû§ÍøËÙ

Ê×ÏÈ´´½¨½«´«Êä¸øÓû§µÄÊý¾ÝÎļþ¡£Õâ¸öÎļþ¿ÉÒÔÓÐÈκÎÄÚÈÝ£¬²»Óõ£ÐÄ£¬ÒòΪÓû§ÓÀÔ¶¶¼¿´²»µ½Õâ¸öÎļþ¡£ÎÒÃÇ¿¼ÂÇÉú³É´óÁ¿Îı¾²¢Ð´Èëµ½ÎļþÀ´´´½¨´ËÎļþ¡£ÀýÈçϱߵĽű¾½«Éú³ÉÒ»¸ö´óÔ¼1500KBµÄÎı¾Îļþ¡££¨ÔÝÖ»ÌṩÕâ¸ö˼·£¬¾ßÌåÂÔ..£©
<?php
/*=====http://hi.csdn.net/yinyiniao=====*/
$fp=fopen("cs.txt","w");
for($i=0;$i<170400;$i++){
fwrite($fp,"bandwidth");
}
fclose($fp);
/*=====http://hi.csdn.net/yinyiniao=====*/
?>
ÏÖÔÚ±àд¼ÆËãÍøÂçËٶȵĽű¾£º
 <?php
/*=====http://hi.csdn.net/yinyiniao=====*/
function mymicrotime(){
list($usec, $sec) = explode(" ",microtime());
return ((float)$usec + (float)$sec);
}
$data=file_get_contents("cs.txt");
$start=mymicrotime();
$fsize=filesize("cs.txt")/1024;
//echo $fsize."kb<br>";
echo "<!--".$data."-->";
$stop=mymicrotime();
$duration=($stop-$start);
//echo $duration."s<br>";
$speed=round($fsize/$duration,2);
echo "Your network speed:$speed KB/sec";
?>


Ïà¹ØÎĵµ£º

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);
} ......

ÔÚApacheÖÐÖ§³ÖPHPµÄÅäÖòÎÊý

´ò¿ª httpd.conf Îļþ ¼ÓÈëÒÔÏÂÅäÖÃ
ÒÔphpÄ£¿éÅäÖÃapache2.2.x 
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL by hooyes
PHPIniDir "D:/php-5.2.6-Win32/"
LoadFile D:/php-5.2.6-Win32/php5ts.dll
LoadFile D:/php-5.2.6-Win32/li ......

ÓÅ»¯PHP³ÌÐò

ÏÈÎÒÃÇÁ˽âÒ»ÏÂÎÒÃǵÄphp³ÌÐòÊÇÔõÑùÖ´Ðеģ¬Ê×ÏÈËû±»±àÒëΪÖмä´úÂ룬ȻºóÖмä´úÂë±»ËÍÈëÖ´ÐÐÒýÇæÖ´ÐУ¬È»ºóÏú»Ù¡£Ã¿¸öÇëÇóµÄÖмä´úÂëÔÚÖ´ÐÐÍêÖ®ºó±»Ïú»Ù£¬ÕâÑùµÄºÃ´¦ÔÚÓÚËûÍêÈ«¸ôÀëÁ˲»Í¬µÄÇëÇó£¬Ê¹ÄÚ´æʹÓÃÂʽµµÍ¡£µ«ÊÇÕâÑùµÄȱµãÒ²ÏÔ¶øÒ×¼û£¬ÒòΪËûÐèÒªÔÙÖظ´ÇëÇóÒ»¸ö½çÃæµÄʱºò¶ÔÒ»¸ö´úÂëÁ¬Ðø±àÒëÁ½´Î£¬±àÒëµÄÖмä´úÂëà ......

php ajax debug method make log in a text file

log into file
//
ob_start();
echo "<pre>";
print_r($data);
echo "</pre>";
$a=ob_get_contents();
//DAL::remove("insert into mytest(vvv) values('$a')");
$filename = "file.txt";
$file = fopen($filename, "w") ......

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

¶ÔÓÚÔËÐÐÔÚapacheÀïµÄphpÓ¦ÓÃÀ´Ëµ£¬static±äÁ¿µÄ×÷ÓÃÓòÊÇÒ»´ÎhttpÇëÇó¡£
¿ÉÒÔͨ¹ýÒÔÏ´úÂë½øÐÐÑéÖ¤£º
<?php
# test.php
function test(){
     static $sss = 0;
     ++$sss;
     echo $sss;
}
test();
?>
·ÃÎÊ/test.php £¬¿ÉÒÔ¿´µ½£¬×ÜÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ