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

PHP½ØÈ¡¹Ì¶¨³¤¶È×Ö·û´®º¯Êý

<?php   
  
function toFixLen($str,$len){ //¹Ì¶¨³¤¶È×Ö·û´®µÄ½ØÈ¡   
  
    if($len>=strlen($str)||!$len) return $str;   
  
    $len-=3;   
  
    $tempstr1 = substr($str,0,$len); //½ØÈ¡×Ö·û´®   
  
    $tempstr2 = preg_replace('/([\x81-\xff]+)$/ms','',$tempstr1,1); //È¥µô½áβµÄÁ¬Ðøºº×Ö×Ö·û   
  
    if(!is_int((strlen($tempstr1)-strlen($tempstr2))/2)){ //È¥µôµÄ×Ö·ûÎªÆæÊý?   
  
        $tempstr1 = substr($str,0,$len-1);   
  
    }   
  
    return $tempstr1."…";   
  
}   
  
?>
±¾ÎÄÀ´×ÔCSDN²©¿Í£¬×ªÔØÇë±êÃ÷³ö´¦£ºhttp://blog.csdn.net/renren000/archive/2009/02/02/3858694.aspx


Ïà¹ØÎĵµ£º

ubuntu Ï ´î½¨ apache+php+mysql


#apt-get install apache2
//°²×°apahce2
#apt-get install php5
//°²×°php5
#apt-get install mysql-server
//°²×°mysql·þÎñ¶Ë
#apt-get install  mysql-myclient
//°²×°mysqlµÄ¿Í»§¶Ë
#apt-get install php-mysql
//°²×°php-mysqlµÄÁ¬½á
apache+php+mysql »·¾³ÒѾ­´î½¨ºÃÁË
½«ÒÔϵķþÎñÖØÆôÒ»ÏÂ
#/et ......

phpÀ©Õ¹°²×°soapÄ£¿é





Ê×ÏȰ²×°Íêphp
ºó×îºÃ±£Áôµ±Ê±°²×°µÄÎļþ£¬±ÈÈçÎҵķ¾¶/export1/soft
#cd php-5.2.8/ext/soap
#/usr/local/php/bin/phpize
#./configure --with-php-config=/usr/local/php/bin/php-config
--enable-soap
#make
#make install

±àÒëºóµÄsoap.so
Îļþ± ......

ÓÃVIM×öPHP¿ª·¢»·¾³



ÀÏÁÎÔø¾­ÔÚPHPERÔÓÖ¾ÉÏ·¢±í¹ýһƪÎÄÕ½Ð×öÓÃVIM×öPHP¿ª·¢»·¾³,ÔÚÀïÃæÏêϸ½éÉÜÁËÓÃVIM×öphp¿ª·¢ÐèÒª×öµÄ×¼±¸,ÕâÆªÎÄÕ¾ͽáºÏһЩ×ÊÁϺÍÎÒ×Ô¼ºµÄһЩ¾­ÑéÀ´½éÉÜÏÂÓÃVIM×öC/C++¿ª·¢ÐèÒª×öµÄÊÂÇé,Ïà¶ÔÀ´ËµÒª±È×öphp¿ª·¢·½±ãЩ¡£
ǰÌáÌõ¼þÊǵ±È»ÊÇÄãÒѾ­ÏÂÔØÁËVIM,Èç¹ûûÓеϰÇëÏȵ½¹Ù·½ÍøÕ¾ÏÂÔØ×îа汾,µØÖ·ÊÇ£ºhttp:/ ......

PHPɾ³ý·Ç¿ÕĿ¼º¯Êý

<?php
function remove_directory($dir) {
  if ($handle = opendir("$dir")) {
   while (false !== ($item = readdir($handle))) {
     if ($item != "." && $item != "..") {
      ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ