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

PHPÖо­³£Óõ½µÄ¼¸¸öÈ¡Õûº¯Êý

ÕûµÄº¯Êý£¬½ñÌìССµÄ×ܽáһϣ¡ÆäʵºÜ¼òµ¥£¬¾ÍÊǼ¸¸öº¯Êý¶øÒÑ¡«¡«Ö÷ÒªÊÇ£ºceil£¬floor£¬round£¬intval
ceil -- ½øÒ»·¨È¡Õû
˵Ã÷
float ceil ( float value )
·µ»Ø²»Ð¡ÓÚ value µÄÏÂÒ»¸öÕûÊý£¬value Èç¹ûÓÐСÊý²¿·ÖÔò½øһλ¡£ceil() ·µ»ØµÄÀàÐÍÈÔÈ»ÊÇ float£¬ÒòΪ float ÖµµÄ·¶Î§Í¨³£±È integer Òª´ó¡£
Àý×Ó 1. ceil() Àý×Ó
<?php
echo ceil(4.3); // 5
echo ceil(9.999); // 10
?>
floor -- ÉáÈ¥·¨È¡Õû
˵Ã÷
float floor ( float value )
·µ»Ø²»´óÓÚ value µÄÏÂÒ»¸öÕûÊý£¬½« value µÄСÊý²¿·ÖÉáȥȡÕû¡£floor() ·µ»ØµÄÀàÐÍÈÔÈ»ÊÇ float£¬ÒòΪ float ÖµµÄ·¶Î§Í¨³£±È integer Òª´ó¡£
Àý×Ó 1. floor() Àý×Ó
<?php
echo floor(4.3); // 4
echo floor(9.999); // 9
?>
round -- ¶Ô¸¡µãÊý½øÐÐËÄÉáÎåÈë
˵Ã÷
float round ( float val [, int precision] ) ·µ»Ø½« val ¸ù¾ÝÖ¸¶¨¾«¶È precision£¨Ê®½øÖÆСÊýµãºóÊý×ÖµÄÊýÄ¿£©½øÐÐËÄÉáÎåÈëµÄ½á¹û¡£precision Ò²¿ÉÒÔÊǸºÊý»òÁ㣨ĬÈÏÖµ£©¡£
Àý×Ó 1. round() Àý×Ó
<?php
echo round(3.4); // 3
echo round(3.5); // 4
echo round(3.6); // 4
echo round(3.6, 0); // 4
echo round(1.95583, 2); // 1.96
echo round(1241757, -3); // 1242000
echo round(5.045, 2); // 5.05
echo round(5.055, 2); // 5.06
?>
intval---¶Ô±äÊýת³ÉÕûÊýÐÍ̬
Àý×Óintval()
<?php
echo intval(4.3); //4
echo intval(4.6); // 4
?>


Ïà¹ØÎĵµ£º

ͶÈëµÄphpµÄ»³±§

 Ô­À´ÊÇѧjspµÄ£¬µ«ÊǸоõjspÌ«ÄÑÁË£¬¶øÇÒ·¢ÏÖ£¬ÏÖÔڱȽÏÁ÷ÐÐphpÁË£¬php+mysqlµÄ»Æ½ð´îµµ¡£
 ¿´jspµÄÊéʱ£¬ÊéÉÏ˵£¬jsp±ÈphpºÃ£¬ÏÖÔÚ¿´phpµÄÊ飬˵php±ÈjspºÃ£¬ÎÒÏëÕâÒ²ÊÇÖÇÕß¼ûÖÇ£¬ÈÊÕß¼ûÈÊ°É¡£
 ÇìÐÒ×Ô¼ºÑ§php·¢ÏÖÁËÒ»±¾ºÃÊ飬ÍƼö¸ø´ó¼Ò£¬¾ÍÊǽ²µÄºÜÏêϸ¡£
 Ó¢ÎÄÃû¡¶PHP and MySQL EXAMPLE¡· ÃÀ¹ ......

Ubuntu 9.04 server°²×°nginx+php(fastcgi)

 
×¼±¸ÖªÊ¶£º
Ubuntu  :
 Ubuntu ÊÇlinuxµÄÒ»¸ö°æ±¾£¬ÓзÇÖÞ·¢²¼µÄ£¬ÏÖÔڱȽÏÁ÷ÐеÄÒ»¸ö°æ±¾¡£
²Î¿¼°Ù¶È˵Ã÷Ubuntu
nginx ¡¡£º
Nginx ("engine x") ÊÇÒ»¸ö¸ßÐÔÄÜµÄ HTTP ºÍ ·´Ïò´úÀí ·þÎñÆ÷£¬Ò²ÊÇÒ»¸ö IMAP/POP3/SMTP ´úÀí·þÎñÆ÷¡£ Nginx ÊÇÓÉ Igor Sysoev Ϊ¶íÂÞ˹·ÃÎÊÁ¿µÚ¶þµÄ Rambler.ru Õ¾µã¿ ......

²»ÍêÈ«µÄHTMLÍ·ÏûÏ¢,¿ÉÄܱ»Ä³Ð©PHP·þÎñÆ÷¾Ü¾ø.

½üÈÕÔÚÓÃ×Ô¼ºÒÔǰдµÄhttpÏÂÔØÆ÷ÏÂÔØijһ¸öphpÒ³ÃæÒÔÍâÔâÓö403´íÎó.µ«ÊÇieÈ´Äܹ»ÕýÈ··ÃÎÊ. ÈÕÖ¾ÈçÏÂ: IE: Time At:0005504671
Line:10
send: 192.168.1.2 –> xxx.xxx.xxx.xxx len:351
GET /test.jpg HTTP/1.1
Accept: */*
Accept-Language: en-us
Accept-Enc ......

PHP ÅúÁ¿É¾³ýÊý¾ÝµÄ·½·¨

 HTML´úÂë
<form action="" method="post">
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="1"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="2"/>
<input name="ID_Dele[]" type="checkbox" id="ID_Dele[]" value="3"/>
<input name="ID_D ......

PHPÖÐmagic_quotes_gpcµÄ×÷ÓÃ

ħÊõÒýÓ÷¢Éú×÷ÓÃÊÇÔÚ´«µÝ$_GET,$_POST,$_COOKIEʱ
1.
Ìõ¼þ£º magic_quotes_gpc=off
дÈëÊý¾Ý¿âµÄ×Ö·û´®Î´¾­¹ýÈκιýÂË´¦Àí¡£´ÓÊý¾Ý¿â¶Á³öµÄ×Ö·û´®Ò²Î´×÷Èκδ¦Àí¡£
Êý¾Ý£º  $data=”snow”’’sun” ; (snowºÍsunÖ®¼äÊÇËĸöÁ¬ÐøµÄµ¥ÒýºÅ).
²Ù×÷£º ½«×Ö·û´®:”snow”’& ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ