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

PHP×Ö·û´®½Ì³Ì_trimº¯Êý

PHP trim() º¯Êý
¶¨ÒåºÍÓ÷¨
trim() º¯Êý´Ó×Ö·û´®µÄÁ½¶Ëɾ³ý¿Õ°××Ö·ûºÍÆäËûÔ¤¶¨Òå×Ö·û¡£
Óï·¨
trim(str,charlist)
 ²ÎÊý 1 strΪ´ý²Ù×÷µÄ×Ö·û´®£¬²ÎÊý 2 charlist ¿ÉÑ¡£¬Ö¸¶¨ÁËÏëҪȥ³ýµÄÌØÊâ·ûºÅ¡£
Èç¹ûµÚ¶þ¸ö²ÎÊýû¸øÖµ£¬Ô¤Éè»áÈ¥³ýÏÂÁÐÕâЩ×ÖÔª£º 
" " (ASCII 32 (0x20)), an ordinary space. 
"\t" (ASCII 9 (0x09)), a tab. 
"\n" (ASCII 10 (0x0A)), a new line (line feed). 
"\r" (ASCII 13 (0x0D)), a carriage return. 
"\0" (ASCII 0 (0x00)), the NUL-byte. 
"\x0B" (ASCII 11 (0x0B)), a vertical tab. 
Èç¹ûҪȥ³ýÆäËü×ÖÔª£¬¿ÉÒÔÔÚµÚ¶þ¸ö²ÎÊýÀïÉ趨¡£
Àý×Ó1
<?php
$str = " ʹÓú¯ÊýtrimÈ¥µô×Ö·û´®Á½¶Ë¿Õ°××Ö·û ";
$str1 = trim($str);
echo "´¦ÀíÇ°ÓÐ".strlen($str)."¸ö×Ö·û";
echo "<br/>"; //www.phpjc.cn
echo "<br/>";
echo "ʹÓÃtrimº¯Êý´¦ÀíºóÓÐ".strlen($str1)."¸ö×Ö·û";
?>
Êä³ö£º
´¦ÀíÇ°ÓÐ39¸ö×Ö·û
ʹÓÃtrimº¯Êý´¦ÀíºóÓÐ34¸ö×Ö·û
Àý×Ó2
<?php
$str = "##ʹÓú¯ÊýtrimÈ¥µô×Ö·û´®Á½¶ËÌض¨×Ö·û####";
$str1 = trim($str,"#"); //Ϊº¯Êýtrim´«ÈëµÚ¶þ¸ö²ÎÊý£¬trim½«É¾³ý×Ö·û´®$strÁ½¶ËµÄ#×Ö·û
echo $str."<br>";
echo $str1;
?>
Êä³ö£º
##ʹÓú¯ÊýtrimÈ¥µô×Ö·û´®Á½¶ËÌض¨×Ö·û####
ʹÓú¯ÊýtrimÈ¥µô×Ö·û´®Á½¶ËÌض¨×Ö·û
¸ü¶à½Ì³ÌÇë²Î¼û¡¡PHP½Ì³ÌÍø(www.phpjc.cn)


Ïà¹ØÎĵµ£º

php³£Óü¼ÇÉ

ÈçºÎÅжÏipµØÖ·ºÏ·¨ÐÔ
if(!strcmp(long2ip(sprintf("%u",ip2long($ip))),$ip)) echo "is ipn";
 emailµÄÕýÔòÅжÏ
eregi("^[_.0-9a-zA-Z-]+@([0-9a-zA-Z][0-9a-zA-Z_-]+.)+[a-zA-Z]$", $email);
¼ì²âipµØÖ·ºÍmaskÊÇ·ñºÏ·¨µÄÀý×Ó
$ip = '192.168.0.84';
$mask = '255.255.255.0';
$network = '192.168.0';
$ip = ......

PHPÍøÒ³µ¼³öWordÎĵµµÄ·½·¨

Ô­Àí
    Ò»°ã£¬ÓÐ2ÖÖ·½·¨¿ÉÒÔµ¼³ödocÎĵµ£¬Ò»ÖÖÊÇʹÓÃcom£¬²¢ÇÒ×÷ΪphpµÄÒ»¸öÀ©Õ¹¿â°²×°µ½·þÎñÆ÷ÉÏ£¬È»ºó´´½¨Ò»¸öcom£¬µ÷ÓÃËüµÄ·½·¨¡£°²×°¹ýofficeµÄ·þÎñÆ÷¿ÉÒÔµ÷ÓÃÒ»¸ö½Ðword.applicationµÄcom£¬¿ÉÒÔÉú³ÉwordÎĵµ£¬²»¹ýÕâÖÖ·½Ê½ÎÒ²»ÍƼö£¬ÒòΪִÐÐЧÂʱȽϵͣ¨ÎÒ²âÊÔÁËһϣ¬ÔÚÖ´ÐдúÂëµÄʱºò£¬·þÎñÆ÷»áÕ ......

PHP ÅäÖÃ Editplus

 
´ò¿ªEditplus£¬Ñ¡Ôñ¹¤¾ß=¡·ÅäÖÃÓû§¹¤¾ß£¬¾ÍÓõ±Ç°µÄĬÈÏ×éºÃÁË¡£µ¥»÷“Ìí¼Ó¹¤¾ß”Ñ¡ÔñµÚÒ»¸ö×ÓÏÌÐò”£¬È¡¸öÃû×Ö¸øËü£¬“PhpDebug”°É¡£ÔÚÃüÁîÖÐä¯ÀÀµ½php.exeµÄλÖ㬲ÎÊýÑ¡ÔñΪ“Îļþ·¾¶”£¬ÕâʱÎҵĽçÃæÉÏÁ½¸öÊäÈë¿òÖзֱðΪ“D:\usr\php.exe”ºÍ&ldquo ......

PHP ʵÏÖ¶à·þÎñÆ÷¹²Ïí SESSION Êý¾Ý

PHP ʵÏÖ¶à·þÎñÆ÷¹²Ïí SESSION Êý¾Ý
PHP ʵÏÖ¶à·þÎñÆ÷¹²Ïí SESSION Êý¾Ý
Ò»¡¢ÎÊÌâÆðÔ´
ÉÔ´óһЩµÄÍøÕ¾£¬Í¨³£¶¼»áÓкü¸¸ö·þÎñÆ÷£¬Ã¿¸ö·þÎñÆ÷ÔËÐÐ×Ų»Í¬¹¦ÄܵÄÄ£¿é£¬Ê¹Óò»Í¬µÄ¶þ¼¶ÓòÃû£¬¶øÒ»¸öÕûÌåÐÔÇ¿µÄÍøÕ¾
£¬Óû§ÏµÍ³ÊÇͳһµÄ£¬¼´Ò»Ì×
Óû§Ãû¡¢ÃÜÂëÔÚÕû¸öÍøÕ¾µÄ¸÷¸öÄ£¿éÖж¼ÊÇ¿ÉÒԵǼʹÓõġ£¸÷¸ö·þÎñÆ÷¹²ÏíÓû§Êý ......

¶ÔASP¡¢JSP¡¢PHP¡¢ASP.NET½øÐÐʵ¼ÊÓ¦ÓÃ%ͳ¼Æ

 ¡¡¡¡¸÷´óÍøÂç±à³ÌÓïÑÔµÄ10Äê·ÜÕ½£¬¸÷ÓÐËù³¤¡¢¸÷ÁìǧÇï¡£½ñÈÕ¶ÔÓÚÎÒÃǵÄÍøÕ¾±à³ÌÓïÑÔ:ASP¡¢JSP¡¢PHP¡¢ASP.NET½øÐÐʵ¼ÊÓ¦ÓÃͳ¼Æ:
¡¡¡¡ASP:50%
¡¡¡¡JSP:10%
¡¡¡¡PHP:20%
¡¡¡¡ASP.NET:20%
¡¡¡¡¸ù¾ÝÒÔÉÏͳ¼ÆÀ´×öÒ»ÏÂÌÖÂÛ¡£ASP¼¼ÊõÈç½ñÌì¿ÉÒÔ˵ÒѳÉΪ¹ýÈ¥£¬µ«ÈÔÕ¼Êг¡µÄ50%£¬ÒòΪµ±Ê±ASP¼¼ÊõµÄÐËÆ𣬶Դ󲿷ֱà³Ì ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ