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

PHP IPµØÖ·ºÍÊ®½øÖÆÊý×Ö»¥×ª

 IPV4 ¿ÉÒÔ¿´×ö4¸ö256½øÖƵÄÊý×Ö, ¿ÉÒÔ°´³£¹æµÄ½øÖÆ×ª»»»»Ëã³ÉÊ®½øÖÆ.
Èç 192.168.1.1 »»Ëã³É10½øÖÆ:
192*256*256*256 + 168*256*256+1*256+1
Æäʵ¼ÆËã»ú¸üÉó¤ÒÆÎ»ºÍÓë»òÔËËã. ¿ÉÒԸĽøËã·¨ÈçÏÂ.
IP ת³¤ÕûÐÍ
public ipToInt($sIP)
{
$aIP = explode('.',$sIP);
$iIP = ($aIP[0] << 24) | ($aIP[1] << 16) | ($aIP[2] << 8) | $aIP[3]
if($iIP < 0) $iIP += 4294967296;
return $iIP;
}

ÕûÐÍת IP:
function intToIP($iIP)
{
$xor = array(0x000000ff,0x0000ff00,0x00ff0000,0xff000000);
for($i=0; $i<4; $i++)
{
${s.$i} = ($iIP & $xor[$i]) >> $i*8;
if (${s.$i} < 0) ${s.$i} += 256;
}
return $s3.'.'.$s2.'.'.$s1.'.'.$s0;
}


Ïà¹ØÎĵµ£º

comparing strings in PHP with the == operator

×î½üÔÚGreg Beaver'sµÄblogÉÏ·¢±íµÄһƪÐÂÎÄÕ comparing strings in PHP with the == operator ÖÐÌá¼°ÁËPHPµÄ == ÔËËã·ûÔÚ¶Ô×Ö·û´®½øÐбȽÏʱֵµÃ×¢ÒâµÄÎÊÌâ¡£
ÔÚijЩÇé¿öÏ£¬PHP»á°ÑÀàÊýÖµÊý¾Ý£¨È纬ÓÐÊý×ÖµÄ×Ö·û´®µÈ£©×ª»»³ÉÊýÖµ´¦Àí£¬== ÔËËã·û¾ÍÊÇÆäÖÐÖ®Ò»¡£ÔÚʹÓà == ÔËËã·û¶ÔÁ½¸ö×Ö·û´®½øÐÐËÉÉ¢±È½Ïʱ£¬PHP»á°ÑÀàÊý ......

ºÜºÃÓõÄphpÖ´ÐÐʱ¼ä·ÖÎö¹¤¾ßwebgrind

ÒÔǰ·ÖÎöxdebugÓõÄÊÇ£¨wincachegrind£©http://sourceforge.net/projects/wincachegrind/
ÏÖÔÚÖ±½Ó°²×°webgrindÀ´µ÷ÊÔËÙ¶È»á¸üºÃ
http://xdebug.org/
ÏÂÔØµØÖ·£º
Source:
xdebug 2.0.3
Windows modules:
PHP 5.1.2-5.1.7
PHP 5.2.1-5.2.6
PHP 5.3.0dev
windows
±à¼­php.ini£¬ÏÈ×¢Ê͵ôzend£º
[Zend]
;zend ......

php²Ù×÷word

<?

//
½¨Á¢Ò»¸öÖ¸ÏòÐÂCOM×é¼þµÄË÷Òý
$word

=

new
COM(”word
.
application”) or
die
(”Can
'
t start Word!”);
// ÏÔʾĿǰÕýÔÚʹÓõÄWordµÄ°æ±¾ºÅ
//echo “Loading Word, v. {$word->Version}<br>”;
// °ÑËüµÄ¿É¼ûÐÔÉèÖÃΪ0£¨¼Ù£©£¬Èç¹ûÒ ......

¡¾PHPϵÁн̡̳¿(1)——µÚÒ»¸öPHPÒ³Ãæ

¡¾PHPϵÁн̡̳¿ÊǸù¾ÝÏÖÓС¶PHP Manual¡·½øÐÐÊÕ¼¯ºÍÕûÀíËùµÃ£¬ËùÓдúÂë¶¼ÒѾ­²âÊÔͨ¹ý¡£ÔÚ×ªÔØ¹ý³ÌÖУ¬Çë×¢Ã÷³ö´¦¡£
Ò»¡¢Ô¤±¸ÖªÊ¶£ºPHP»·¾³µÄ´î½¨
»·¾³µÄ´î½¨ÔÚÇ°ÃæÒѾ­¸ø³öÁËÏêϸµÄ˵Ã÷£¬ÍøÖ·Îª£ºhttp://blog.csdn.net/rocket5725/archive/2009/12/28/5090489.aspx¡£
¶þ¡¢µÚÒ»¸öPHPÒ³Ãæ
ÔÚWEB·þÎñÆ÷¸ùĿ¼ÏÂD:\Progra ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ