21¸öʵÓñãÀûµÄPHP´úÂë
1. PHP¿ÉÔĶÁËæ»ú×Ö·û´®
´Ë´úÂë
½«´´½¨Ò»¸ö¿ÉÔĶÁµÄ×Ö·û´®£¬Ê¹Æä¸ü½Ó½ü´ÊµäÖеĵ¥
´Ê£¬ÊµÓÃÇÒ¾ßÓÐÃÜÂëÑéÖ¤¹¦ÄÜ¡£
/**************
[email=*@length]*@length[/email] - length of random string (must be a
multiple of 2)
**************/
function readable_random_string($length = 6){
$conso=array("b","c","d","f","g","h","j","k","l",
"m","n","p","r","s","t","v","w","x","y","z");
$vocal=array("a","e","i","o","u");
$password="";
srand ((double)microtime()*1000000);
$max = $length/2;
for($i=1; $i<=$max; $i++)
{
$password.=$conso[rand(0,19)];
$password.=$vocal[rand(0,4)];
}
return $password;
}
2. PHPÉú³ÉÒ»¸öËæ»ú×Ö·û´®
Èç¹û²»ÐèÒª¿ÉÔĶÁµÄ×Ö·û´®£¬Ê¹Óô˺¯ÊýÌæ´ú£¬¼´¿É´´½¨Ò»¸öËæ»ú×Ö·û´®£¬×÷ΪÓû§µÄËæ»úÃÜÂëµÈ¡£
/*************
[email=*@l]*@l[/email] - length of random string
*/
function generate_rand($l){
$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
for($i=0; $i<$l; $i++) {
$rand.= $c[rand()%strlen($c)];
}
return $rand;
}
3. PHP±àÂëµç×ÓÓʼþµØÖ·
ʹÓô˴úÂ룬¿ÉÒÔ½«Èκεç×ÓÓʼþµØÖ·±àÂëΪ html ×Ö·ûʵÌ壬ÒÔ·ÀÖ¹±»À¬»øÓʼþ³ÌÐòÊÕ¼¯¡£
function encode_email([email=$email=]$email='info@domain.com'[/email],
$linkText='Contact Us', $attrs ='class="emailencoder"' )
{
// remplazar aroba y puntos
$email = str_replace([email=]'@'[/email], '@', $email);
$email = str_replace('.', '.', $email);
$email = str_
Ïà¹ØÎĵµ£º
Ò»¡¢session¸ÅÊö
sessionÊÇʲô£¬¸Õ¿ªÊ¼ÎÒÒ²²»Ã÷°×£¬·Çרҵ´Êµä·ÒëΪ»áÒ飬»áÒéÆÚ¡£Ö±µ½½Ó´¥aspºó²ÅÖªµÀsessionÊǸÉʲôµÄ£¬ÓÐʲôÓá£×÷¸ö²»Ì«Ç¡µ±µÄ±ÈÓ÷°É£¨ËäÈ»²»Ç¡µ±£¬µ«ÒâÒåÈ´ÊÇÒ»ÑùµÄ£©£¬session¾ÍºÃÏóÄãºÍÄãÅ®ÓÑ(»òÆÞ×Ó)Ö®¼äµÄ¸ÐÇéËÆµÄ£¬sessionÊÇÄãºÍÍøÕ¾Ö®¼äµÄ¸ÐÇé¡£
se ......
http://hi.baidu.com/fish124423/blog/item/c6f9f310190dd779ca80c456.html½â¾öerror trying access httpd. conf file.you will need to manually configure theµÄÅäÖÃÎÊÌâ
Apache+mysql+phpÔÚwindowsϵÄÅäÖÃ(³É¹¦)
2008-12-16 14:49
ApcheÏÂÔØµØµã£ºhttp://www.apache/org
Or http://www.51cto.com/html/ ......
PHPµÄÒ»¸öÊý¾Ý¿â²Ù×÷Àà,ÒÔUTF8¸ñʽдÈë,Êý¾Ý¿âÄÚÖ±½ÓÏÔʾÕý³£ÖÐÎÄ,·ÀÖ¹²éѯ³ö´í
/**
* @author xggxnn
* ±¾ÀàÓÃÓÚʵÏÖÓйØÊý¾Ý¿âµÄ·ÃÎÊ
*
*/
class DBConnection {
private $host = "";
private $user = "";
private $pass = "";
private $DBname = "";
public $isConnected = false;
/**
* ¹¹Ôìº ......
<?php
$p=new ReflectionClass(Àà¶ÔÏó);
$constants=$p->getConstants();//const ¶¨Òå³£Á¿
$properties=$p->getProperties();//ËùÓбäÁ¿ÊôÐÔ
$methods=$p->getMethods();//ËùÓз½·¨
//È«²¿ÒÔÊý×éÐÎÊÆ·µ»Ø
?> ......
PHP
ÊÇÎÒÓùýµÄÓïÑÔÖУ¬×îÁîÈËÄÕ»ðµÄµ«Í¬Ê±Ò²ÊÇ×îÓÐȤµÄÓïÑÔ¡£ÎÒÖ®ËùÒÔ˵“ÁîÈËÄÕ»ð”Ö÷ÒªÊÇÒòΪº¯ÊýÃüÃû¼«Æä²»Ò»Ö¡£¾¡¹ÜÎÒÿÌì¶¼ÒªÓõ½ÕâЩº¯Êý£¬ÎÒ»¹ÊÇÒªÏë
һϓ¾¿¾¹ÊÇ str_pos »¹ÊÇ strpos£¿ÊÇ str_split »¹ÊÇ
strsplit£¿”¡£ÁíÒ»·½Ã棬ÓÐʱºò¿ÉÒÔÓÃÒ»Ðмòµ¥µÄ´úÂë¾ÍÄܽâ¾öÒ»¸öÄÑÌâ¡£
ÏÂÃæ ......