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

php×Ö·ûת»»µÄÎÊÌâ - PHP / »ù´¡±à³Ì

str_replace¿ÉÒÔÌæ»»Ò»¸ö¹Ø¼ü×Ö£¬Èç¹ûÏë·Ö±ðÌæ»»¶à¸ö¹Ø¼ü×Ö£¨ÀýÈçÔÚÒ»¸ö×Ö·û´®ÖУ¬°ÑaÌæ»»b£¬°ÑcÌæ»»d£©£¬³ýÁËÑ­»·str_replaceÖ®Í⣬»¹ÓÐûÓиüÓÐЧµÄ·½·¨ÄØ£¬×îºÃÊÇÒ»¸öº¯Êý»òÕßÊÇÒ»¸öÕýÔòÌæ»»µÄ£¿

ûÓÐʲô ¸üÓÐЧÁË Öظ´Ê¹ÓÃËüstr_replace() ÀýÈ磺
 function safe_replace($string)
{  
  $string = str_replace('*','',$string);
  $string = str_replace('"','"',$string);
  $string = str_replace("'",'',$string);
  ...............
  return $string;  
}
Äãµ÷ÓÃÕâ¸öº¯Êý ¾ÍOKÁË

Ä¿Ç°´ó²¿·ÖµÄÍøÕ¾ Ò²¾ÍÊÇÕâÑùдµÄ

ÒýÓÃ

Ä¿Ç°´ó²¿·ÖµÄÍøÕ¾ Ò²¾ÍÊÇÕâÑùдµÄ

¶î...Èç¹ûÓÐN¸ö¹Ø¼ü×ÖÒªÌæ»»µÄ£¬ÄDz»ÊÇÒªµ÷ÓÃN´Ëstr_replace£¬ÎÒ¾õµÃÕâ¸öºÜûЧÂʲÅÉÏÀ´ÎÊÏÂÓÐʲôºÃµÄ·½·¨µÄ£¬³ýÁËһ¥µÄ¾Íû±ðµÄ·½·¨ÁË£¿

ÎÒ¾õµÃһ¥µÄ±È½ÏÓÐЧÂÊÒ»µã



str_replaceµÄ²ÎÊýÊÇ¿ÉÒÔÊÇÊý×éµÄ¡£±ÈÈ磺
str_replace(array("a","b"),'x',$s); //°ÑaºÍb¶¼Ìæ»»³Éx
str_replace(array('a','b'),array('x','y'),$s); //°ÑaÌæ»»³Éx£¬°ÑbÌæ»»³Éy


Äã¸úÎÒ·¢Ò»Ñù¸Éʲô£¿
ÒýÓÃ
str_replaceµÄ²ÎÊýÊÇ¿ÉÒÔÊÇÊý×éµÄ¡£±ÈÈ磺
str_replace(array("a","b"),'x',$s); //°ÑaºÍb¶¼Ìæ»»³Éx
str_replace(array('a','b'),array('x','y'),$s); //°ÑaÌæ»»³Éx£¬°ÑbÌæ»»³Éy



Ïà¹ØÎÊ´ð£º

php¸újspÖ®¼äsession¹²ÏíµÄÎÊÌâ - Java / Web ¿ª·¢

×î½üÒ»¸öÏîÄ¿ÖÐÓöµ½Ò»¸öÎÊÌ⣺ÔÚÔ­ÓеÄÒ»Ì×ϵͳÖÐ(php¿ª·¢)Ìí¼ÓһЩС¹¦ÄÜ(jsp¿ª·¢)£¬Ô­À´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨
......

phpÁ¬½ÓMSSQL Á¬²»ÉÏ - PHP / »ù´¡±à³Ì

Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Çý¶¯³ÌÐò¹ÜÀíÆ÷] δ·¢ÏÖÊý¾ÝÔ´Ãû³Æ²¢ÇÒδָ¶¨Ä¬ÈÏÇý¶¯³ÌÐò, SQL state IM002 in SQLConnect in D:\0\msc\msc\tel.php on line 44
Í ......

php mail - PHP / »ù´¡±à³Ì

ÎÒ×î½üдÁ˸ömailÖ´ÐкóûÓгöÏÖ´íÎóÐÅÏ¢Ö´ÐÐÍê±ÏºóÓÊÏäÀﲢû·¢ËÍÓʼþ£¬Çë¸÷λ°ïÎÒ¿´¿´
ÎÒÓõĵÄÊÇiis smtp
<?php
$to = 'xueyuxia1988@sohu.com';
$subject = 'the subject';
$message = 'hello';
$ ......

PHP+ACCESSʵÏÖ¶þ¼¶Áª¶¯²Ëµ¥ - PHP / »ù´¡±à³Ì

ÍøÉϺöà¶þ¼¶Áª¶¯µÄ£¬Ö»ÊǶ¼Ã»ÓвÉÓÃAccessÊý¾Ý¿âµÄ£¬php²»ÊìϤ£¬ÓÐÁ½¸öÊý¾Ý±í·Ö±ðΪlb(Àà±ð£º±àºÅ£¬Àà±ðÃû³Æ£©into_product(²úÆ·¹ÜÀí£ºid,Ãû³Æ£¬Àà±ðµÈ×ֶΣ©
ÏëҪʵÏÖ£ºµÚÒ»¸öÏÂÀ­²Ëµ¥Ñ¡ÔñÍêÀà±ðºó£¬µÚ¶þ²Ëµ¥¾Í°Ñ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ