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¿ª·¢)£¬ÔÀ´Óû§ÏµÍ³¶¼ÊÇphp¿ª·¢µÄ£¬ÎÒÈçºÎÔÚjsp¿ª·¢µÄ¹¦ÄÜÖÐ×öµ½Óû§ÐÅÏ¢sessionͬ²½ÄØ£¿ ÓÐÈËÊÇ·ñÓÐ×ö¹ýÀàÒÔÏîÄ¿£¬ÏëÌýÌý´ó¼ÒµÄ¿´·¨ ......
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 Í ......
ÎÒ×î½üдÁ˸ömailÖ´ÐкóûÓгöÏÖ´íÎóÐÅÏ¢Ö´ÐÐÍê±ÏºóÓÊÏäÀﲢû·¢ËÍÓʼþ£¬Çë¸÷λ°ïÎÒ¿´¿´ ÎÒÓõĵÄÊÇiis smtp <?php $to = 'xueyuxia1988@sohu.com'; $subject = 'the subject'; $message = 'hello'; $ ......
ÍøÉϺöà¶þ¼¶Áª¶¯µÄ£¬Ö»ÊǶ¼Ã»ÓвÉÓÃAccessÊý¾Ý¿âµÄ£¬php²»ÊìϤ£¬ÓÐÁ½¸öÊý¾Ý±í·Ö±ðΪlb(Àà±ð£º±àºÅ£¬Àà±ðÃû³Æ£©into_product(²úÆ·¹ÜÀí£ºid,Ãû³Æ£¬Àà±ðµÈ×ֶΣ© ÏëҪʵÏÖ£ºµÚÒ»¸öÏÂÀ²Ëµ¥Ñ¡ÔñÍêÀà±ðºó£¬µÚ¶þ²Ëµ¥¾Í°Ñ ......