PHP½ø¶ÈÌõЧ¹û
ÓÃPHPʵÏÖ½ø¶ÈÌõЧ¹û¡£
<?php
set_time_limit(0);
echo '<h2>ÕýÔÚ°²×°£¬ÇëÉÔºó...</h2>',
'<div style="border:1px solid #000;width:500px;"><div id="progress_bar">loading...</div></div>';
for($i=1;$i<=100;$i++){
$width = '500';
$width = ceil(($i/100)*$width);
echo '<mce:script type="text/javascript"><!--
',
'var progress_bar = document.getElementById("progress_bar");',
'progress_bar.style.background="#ff0000";',
'progress_bar.style.width ="'.$width.'px";',
"progress_bar.innerHTML = '{$i}%';",
'
// --></mce:script>';
sleep(1);
flush();
}
echo 'done';
?>
Ïà¹ØÎĵµ£º
×òÌìÎÒÃÇʵÏÖÁËÒ»¸ö¼òµ¥µÄËÑË÷¹¦ÄÜ£¬½ñÌìÎÒÏëÁËһϣ¬Æäʵ»¹ÓпÉÒԸĽøµÄµØÖ·£¬ÈçÖ±½ÓÓÃIndex.php´úÌæSearch.php¡£
ÐÞ¸ÄIndex.phpÎļþ£¬ÐÞ¸ÄÒ»ÏÂËÑË÷±íµ¥
<!---ËÑË÷¿ò--->
<!--ÕâÀïµÄËùÓÐÖµÇ°Ãæ¼Óǰ׺“S_”ÒÔÇø·Ö-->
<form id="form1" name="form1" method="get" action="Index.php">
&n ......
GyPSiiÀûÓÃXML-RPC£¬PHPÀïXML-RPCµÄÏà¹ØÓ¦ÓÃʾÀýºÜ¶à£¬²é²éÊֲᡢGOOGLEһϾͿÉÒÔÕÒµ½ºÜ¶à¡£GyPSii APIÀïÌṩÁËÒ»¸ö²Ù×÷ÀàÓÃÀ´ÇëÇó·þÎñ£¬²¢ÌṩÁËÒ»¸öÇëÇóº¯Êý£¬Ö»Òª½«´Ëº¯Êý·Å½ø²Ù×÷ÀàÀ¾Í¿ÉÒÔ·½±ãµÄʹÓÃÁË£¬º¯ÊýÈçÏ£º
function GyPSiiXMLRPC( $uri, $host, $pid, $body="" ) {
$this->addHeader( 'Content-T ......
Floating point precision
It is typical that simple decimal fractions like 0.1
or
0.7
cannot be converted into their internal binary
counterparts without a small loss of precision. This can lead to
confusing
results: for example, floor((0.1+0.7)*10)
will usually
return 7
......
PHP ÖеÄÑ»·Óï¾äÓÃÓÚÖ´ÐÐÏàͬµÄ´úÂë¿éÖ¸¶¨µÄ´ÎÊý¡£
Ñ»·
ÔÚÄú±àд´úÂëʱ£¬Äú¾³£ÐèÒªÈÃÏàͬµÄ´úÂë¿éÔËÐкܶà´Î¡£Äú¿ÉÒÔÔÚ´úÂëÖÐʹÓÃÑ»·Óï¾äÀ´Íê³ÉÕâ¸öÈÎÎñ¡£
ÔÚ PHP ÖУ¬ÎÒÃÇ¿ÉÒÔʹÓÃÏÂÁÐÑ»·Óï¾ä£º
while Ö»ÒªÖ¸¶¨µÄÌõ¼þ³ÉÁ¢£¬ÔòÑ»·Ö´ÐдúÂë¿é do...while Ê×ÏÈÖ´ÐÐÒ»´Î´úÂë¿é£¬È»ºóÔÚÖ¸¶¨µÄÌõ¼þ³ÉÁ¢Ê±Öظ´Õâ¸öÑ» ......