PHPÓëJS È¡ÕûÊý·½·¨int,celi,floor,round
PHPÓëJS---È¡ÕûÊý·½·¨int,celi,floor,round
1.¶ªÆúСÊý²¿·Ö,±£ÁôÕûÊý²¿·Ö
php: intval(7/2)
js:parseInt(7/2)
2.ÏòÉÏÈ¡Õû,ÓÐСÊý¾ÍÕûÊý²¿·Ö¼Ó1
php: ceil(7/2)
js: Math.ceil(7/2)
3,ËÄÉáÎåÈë.
php: round(7/2)
js: Math.round(7/2)
4,ÏòÏÂÈ¡Õû
php: floor(7/2)
js: Math.floor(7/2)
ÒÔÉÏת×Ô:http://hi.baidu.com/realsoso/blog/item/41bae603d515d0dc267fb536.html
<input onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')">
<input name=txt1 onchange="if(/\D/.test(this.value)){alert('Ö»ÄÜÊäÈëÊý×Ö');this.value='';}">
¸öÈ˸оõphpµÄfloorº¯ÊýÓëintvalº¯Êý¹¦ÄÜÏàͬ£¬Ëù²»Í¬Ö®´¦ÊÇÒ»¸ö·µ»ØµÄÕûÊý£¬¶øÁíÒ»¸öÊǸ¡µãÊý£¬²»¹ý¾ÍÊýÖµ±¾ÉíÀ´ËµÁ½ÕßÊÇÏàµÈµÄ£¬ÒòΪfloorÊǸ¡µãÊýÔÚ¾«¶ÈÉÏÒª±ÈintvalÒª¸ßµã¡£
intval
int intval ( mixed $var [, int $base ] )
ͨ¹ýʹÓÃÌØ¶¨µÄ½øÖÆ×ª»»£¨Ä¬ÈÏÊÇÊ®½øÖÆ£©£¬·µ»Ø±äÁ¿ var µÄ integer ÊýÖµ¡£
var ¿ÉÒÔÊÇÈκαêÁ¿ÀàÐÍ¡£intval() ²»ÄÜÓÃÓÚ array »ò object¡£
(PHP 4, PHP 5)
floor — ÉáÈ¥·¨È¡Õû
·µ»Ø²»´óÓÚ value µÄÏÂÒ»¸öÕûÊý£¬½« value µÄСÊý²¿·ÖÉáȥȡÕû¡£floor() ·µ»ØµÄÀàÐÍÈÔÈ»ÊÇ float£¬ÒòΪ float ÖµµÄ·¶Î§Í¨³£±È integer Òª´ó¡£
Ïà¹ØÎĵµ£º
php¶ÔxmlÎļþÖнڵãµÄɾ³ý\±à¼
ʹÓÃgetElementsByTagName()·½·¨É¾³ý\±à¼XML½Úµã
Èý¸öÎļþ£º
1.root.xml
2.remove.php —— ɾ³ý½Úµã
3.replace.php —— Ìæ»»½Úµã
root.xml
<root>
<child1>child1 content</child1>
<child2>child2 content</child2>
& ......
ÏÂÃæÊÇһЩ·Ç³£ÓÐÓõÄPHPÀà¿â£¬ÏàÐÅÒ»¶¨¿ÉÒÔΪÄãµÄWEB¿ª·¢Ìṩ¸üºÃºÍ¸üΪ¿ìËٵķ½·¨¡£
ͼ±í¿â
ÏÂÃæµÄÀà¿â¿ÉÒÔÈÃÄãºÜ¼òµÄ´´½¨¸´ÔÓµÄͼ±íºÍͼƬ¡£µ±È»£¬ËüÃÇÐèÒªGD¿âµÄÖ§³Ö¡£
pChart - Ò»¸ö¿ÉÒÔ´´½¨Í³¼ÆÍ¼µÄ¿â¡£
Libchart - ÕâÒ²ÊÇÒ»¸ö¼òµ¥µÄͳ¼ÆÍ¼¿â¡£
JpGraph - Ò»¸öÃæÏò¶ÔÏóµÄͼƬ´´½¨Àà¡£
Open Flash Chart - ÕâÊ ......
½â¶ÁPHP DOMDocumentÔÚ½âÎöXMLÎļþÖеÄ×÷ÓÃ
http://developer.51cto.com 2009-12-02 10:39 ØýÃû Áø³Ç²©¿Í ÎÒÒªÆÀÂÛ(0)
PHP DOMDocumentµÄ¹¦Äܷdz£Ç¿´ó£¬ÎÒÃÇÔÚÕâÆªÎÄÕÂÖн«½éÉÜÈçºÎÕýÈ·µÄÔËÓÃPHP DOMDocumentÀ´½øÐÐXMLÎļþµÄ½âÎö¡£Ï£Íû¶ÔÓÖÐèÒªµÄÅóÓÑÓÐËù°ïÖú¡£
ÔÚʹÓÃPHP¶ÔXMLÎļþ½øÐнâÎöµÄʱ ......
PHP»º´æ´úÂë
ºÃµÄÒ³Ãæ»º´æ´úÂ룬¿ÉÒÔ¼õÇáCPUºÍMYSQL¸ºµ£¡£Ê¹ÓÃǰ£¬ÏÈÔÚ¸ùĿ¼´´½¨“cache”Îļþ¼Ð£¬È»ºóÔËÐÐ1.php£¬µÚÒ»´ÎÔËÐк͵ڶþ´ÎÔËÐÐËٶȲîÒìºÜ´ó¡£»¶ÓÊìϤPHPµÄÅóÓÑʹÓúÍÌáÒâ¼û¡£
ʹÓ÷½·¨:(Çë±£´æÎªtemp.php)
<?php
include('arrcache.php');
$cache = new ArrCache('cache',5,'txt');
......
×î½ü·¢ÏֺܶàÍøÕ¾¶¼ÓÐһЩȦÈËÍ·ÏñµÄ¹¦ÄÜ£¬ºóÀ´ÔÚÍøÉÏGGÁËһϣ¬·¢ÏÖÊÇÓÃOpenCVʵÏֵģ¬ÎÒÒ²ÔÚÄÚ²¿·þÎñÆ÷×öÁËһϲâÊÔ£¬Èç¹û¿ÉÒÔʵÏÖ£¬²½ÖèÈçÏ£º
Ò» °²×°
1¡¢°²×°opencv
¹Ù·½ÍøÕ¾£ºhttp://www.opencv.org.cn £¨ÖÐÎİ棩
¾ßÌå°²×°·½·¨¿ÉÒԲο¼¹Ù·½ÍøÕ¾£º
http://www.opencv.org.cn/index.php/%E6%BA%90%E7%A0%81%E7% ......