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

¶þ½øÖÆȨÏÞ¿ØÖÆPHPÀà

<?php
/* ¶þ½øÖÆȨÏÞ¿ØÖÆPHPÀà
* ×÷ Õß: ¶à²ËÄñ
* ÓÊ Ïä: kingerq AT QQ DOT com
* À´ Ô´£ºhttp://blog.csdn.net/kingerq/archive/2009/10/22/4714223.aspx
* ´´½¨Ê±¼ä: 2009-10-22
*/
class binPower{

var $power = "";
//ȨÏÞ´æÖü±äÁ¿,Ê®½øÖÆÕûÊý

function __construct($power){
$this->power = intval($power);
}
/* Ìí¼ÓÖ¸¶¨È¨ÏÞ
* $right Ϊ2µÄN´Î·½Ê®½øÖÆÕûÊý£¬N´ú±íȨÏÞÐòºÅ
*/
function addPower($right){
//ÀûÓÃÂß¼­»òÌí¼ÓȨÏÞ
$this->power = $this->power | intval($right);
}

/* ɾ³ýÖ¸¶¨È¨ÏÞ
* $right Ϊ2µÄN´Î·½Ê®½øÖÆÕûÊý£¬N´ú±íȨÏÞÐòºÅ
*/
function delPower($right){
//ɾ³ýȨÏÞ£¬ÏȽ«Ô¤É¾³ýµÄȨÏÞÈ¡·´£¬ÔÙ½øÐÐÓë²Ù×÷
$this->power = $this->power & ~intval($right);
}
/* ÅжÏÊÇ·ñ´æÔÚÖ¸¶¨È¨ÏÞ
* $right Ϊ2µÄN´Î·½Ê®½øÖÆÕûÊý£¬N´ú±íȨÏÞÐòºÅ
*/
function isPower($right){
//ȨÏޱȽÏʱ£¬½øÐÐÓë²Ù×÷£¬µÃµ½0µÄ»°£¬±íʾûÓÐȨÏÞ
if( ($this->power & intval($right)) == 0 ) return false;
return true;
}
/*
* ·µ»Ø²Ù×÷ºóµÄȨÏÞ
*/
function returnPower(){
//ΪÁ˼õÉÙ´æÖüλÊý£¬·µ»ØÒ²¿ÉÒÔת»¯ÎªÊ®Áù½øÖÆ
return $this->power;
}
}
/*
//ʾÀý
$right = new binPower(bindec(110011));
echo "Power: ".$right->power.' | '.decbin($right->power);
echo "<br>\n";
$right->addPower(4);
echo "Power +4: ".$right->power.' | '.decbin($right->power);
echo "<br>\n";
$right->delPower(2);
echo "Power -2: ".$right->power.' | '.decbin($right->power);
echo "<br>\n";
echo $right->isPower(bindec(100));
echo "Power is ".bindec(100).": ".$right->power.' | '.decbin($right->power);
echo "<br>\n";
*/
?>
<script language="javascript">
<!--
/*
* ¶þ½øÖÆȨÏÞ¿ØÖÆJAVASCRIPTº¯Êý
* ×÷ Õß: ¶à²ËÄñ
* ÓÊ Ïä: kingerq AT QQ DOT com
* À´ Ô´£ºhttp://blog.csdn.net/kingerq/archive/2009/10/22/4714223.aspx
* ´´½¨Ê±¼ä: 2009-10-22
*/
//³õʼȨÏÞ£¬Ê®½øÖÆ
var power;
/* Ìí¼ÓȨÏÞ


Ïà¹ØÎĵµ£º

Éý»ªÌṩÖÕÉíÃâ·ÑASP+access PHP+mysqlÐéÄâÖ÷»ú

Éý»ªÌṩÖÕÉíÃâ·ÑASP+access PHP+mysqlÐéÄâÖ÷»ú
Ò»£ºÉý»ªÍøÂç¿Æ¼¼ÓÐÏÞ¹«Ë¾,ÓëÉý»ªÍ¬ÔÚÕ¾³¤ÖÕÉíÃâ·Ñ¿Õ¼ä·ö³Ö¼Æ»®.
1¡¢×ð¾´µÄÓû§ÄúºÃ,Ò²ÐíÄú»¹ÔÚΪÿÄêÒ»½»µÄ¿Õ¼ä·ÑÓ÷¢³î,Ò²ÐíÄúÏë»ñµÃÒ»¸ö¸üÓÅÖʵĿռäÈ´²»ÏëͶÈëÌ«¶à,´ÓÏÖÔÚÆð ÕâЩÎÊÌ⽫ӭÈжø½â→Éý»ªÍøÂç←ÓëÉý»ªÍ¬ÔÚÕ¾³¤·ö³Ö¼Æ»®È«ÃæÆô¶¯¡£
2¡¢Ã»ÓÐ×¢²á¹«Ë¾ ......

PHPʵÏÖÎļþµÄ¶ÁºÍд¹¦ÄÜ

½øÐÐÎļþµÄ¶ÁºÍд£¬ÏÈ´ò¿ªÒ»¸öÎļþ£¬È»ºó¿ªÊ¼¶Á»òÕßдÎļþ£¬×îºóÔÙ¹ØϵÕâ¸öÎļþ×ÊÔ´¡£
È磬ÎļþµÄ¶Á²Ù×÷£º
<?php
$file = fopen('your file path','r');
while(!feof($file)){ //µ±Ã»ÓжÁÈ¡µ½Îļþ½á⣬¼ÌÐøÑ­»·¶ÁÈ¡²Ù×÷
$line = fgets($file); //¶ÁÈ¡µ½Ò»ÐеÄÄÚÈÝ
echo $line.'<br/>';
}
fclose($file) ......

php stdClass


ÎÊÌ⣺
ÄãÏë´´½¨Ò»¸ö¶ÔÏ󣬲¢ÔÚÆäÖÐÌí¼ÓһЩÊôÐÔ£¬µ«ÊÇÄãÈ´²»Ïë°ÑËü×÷Ϊһ¸öÃ÷È·µÄÀàÕýʽµØ¶¨ÒåËü¡£ÕâÒ»µãÔÚһЩÇé¿öÏÂÊÇÏ൱ÓÐÓõģ¬ÀýÈçµ±ÄãÐèÒª¶¨ÒåÒ»¸ö·½·¨À´·µ»Ø´øÓÐijЩÊôÐÔ£¨²»È·¶¨µÄ£©µÄ¶ÔÏóʱ£¬¾ÍÈçͬ´Ómysql_fetch_object( ) »òÕß imap_header( )µÄʹÓÃÒ»Ñù¡£
һάÊý×é,ÎÒÏÖÔÚÌرðϲ»¶°ÑËüд³É¶ÔÏó,ÒòΪ¼üÅÌ´ ......

PHP»º´æ¼¼ÊõÏê̸

Ò»¡¢ÒýÂÛ
PHP,Ò»ÃÅ×î½ü¼¸ÄêÐËÆðµÄwebÉè¼Æ½Å±¾ÓïÑÔ,ÓÉÓÚËüµÄÇ¿´óºÍ¿ÉÉìËõÐÔ,½ü¼¸ÄêÀ´µÃµ½³¤×ãµÄ·¢Õ¹,phpÏà±È´«Í³µÄaspÍøÕ¾,ÔÚËÙ¶ÈÉÏÓоø¶ÔµÄÓÅÊÆ,Ïëmssqlת6ÍòÌõÊý¾ÝphpÈçÐèÒª40Ãë,asp²»ÏÂ2·ÖÖÓ.µ«ÊÇ,ÓÉÓÚÍøÕ¾µÄÊý¾ÝÔ½À´Ô½¶à,ÎÒÃÇ¿ÊÇóÄܸü¿ìËٵĵ÷ÓÃÊý¾Ý,²»±ØҪÿ´Î¶¼´ÓÊý¾Ý¿âµô,ÎÒÃÇ¿ÉÒÔ´ÓÆäËûµÄµØ·½,±È·½Ò»¸öÎļþ,»òÕßij¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ