È¥µôÖÐÎÄ¿Õ¸ñµÄPHPÕýÔò´úÂë
ÖÐÎÄ¿Õ¸ñÕâÀïÃæÓкü¸ÖÖ£ºÃ»Óмòµ¥µÄ½â¾öÎÊÌâµÄ·½Ê½£¬±ÈÈç°ë½ÇÈ«½Ç¿Õ¸ñ£¬±ÈÈç¶ÎÂä·û¶¼»áÏÔʾΪ¿Õ°×µÄ£¬È»ºóÈÃÈËÃÇÎó½âËüÊÇ¿Õ¸ñ£¬ËùÒÔÈ¥µô¿Õ¸ñ֮ǰһ¶¨ÒªÏÈÈ·ÈÏ×Ô¼ºµÄÊDz»ÊÇ¿Õ¸ñ£¬ÎÒÏÂÃæ·ÖÎöÒ»ÏÂÕâÁ½ÖֵĽâ¾ö°ì·¨¡£
£¨1£©/[\s| ]+/Õâ¸ö¾Í¿ÉÒÔ£¬×¢Òâ|ºóÃæµÄ¸úµÄÊÇÈ«½Ç¿Õ¸ñ
£¨2£©mbÖеÄÕýÔòÌæ»»Ò²¿ÉÒÔÊÔÊÔ
ÁíÍâ×¢ÒâʹÓÃUnicodeµÄʱºò£¬¼ÓÉÏÕýÔò±í´ïʽÃèÊö·ûu
µ«ÓÉÓÚººÓïÖÐÏÔʾΪ¿Õ¸ñÄ£ÑùµÄÓкܶà¸ö£¬±ÈÈç˵ÎÒÏÂÃæÅöµ½µÄÕâôһ¸ö£¬ËüµÄunicode±àÂëΪC2A0£¬Ê¹ÓÃÏÂÃæµÄ±í´ïʽ¾ÍÄܽâ¾öÎÊÌâ¡£
$new['content'] = preg_replace('/^[(\xc2\xa0)|\s]+/', '',
$new['content']);
ÕâÀïÓиöϸ½Ú£º \xc2a0±¾À´ÊÇÒ»¸öUnicode×Ö·û£¬µ«ÊDz»ÄÜÆ¥Åä¶à¸ö£¬Ö»ÄÜÌæ»»Ò»¸ö£¬¡¾ÕâÀï¿ÉÄÜÊÇÒòΪ×Ö½ÚµÄÔÒò¡¿ºóÀ´Í»È»ÕÒµ½ÕâôһÖÖд·¨£¬½â¾öÁËÎÊÌ⣬ÁíÍâΪÁ˱ÜÃ⣬ÖÐÎÄ¿Õ¸ñºÍÓ¢ÎÄ¿Õ¸ñÏà»ìÔÓµÄÇéÐΣ¬ºóÃæÓÖ¼ÓÁ˸ö\sÀ´Çå³ý¡£
ÆäʵÔÚUnicodeÉϵÄÕýÔò±í´ïʽȷʵ²»ÔõôºÃÓá£
Ïà¹ØÎĵµ£º
phpÏÂÔØ£º
http://windows.php.net/download/
Ñ¡Ôñ
VC6 x86 Thread Safe (2010-Mar-04 20:11:08)
VC6 x86´ú±í Apache HTTP Server (httpd) 2.2.15 ºÍPHP½áºÏ
apacheÏÂÔØ£º
http://httpd.apache.org/download.cgi#apache22
Ñ¡Ôñ2.2.15
httpd-2.2.15-win32-x86-no_ssl.msi [PGP] [MD5] [SHA1]
apache services 2.2Ð ......
ÔÎĵØÖ·£ºhttp://hi.baidu.com/pengpeng5047/blog/item/c3f3b003d0452a034bfb519f.html
±ÈÈçÏÂÃæµÄ±íµ¥£º
/*form.php*/
<form action="getform.php" method="post">
<table border="1">
<tr>
<th>ÐÕÃû</th>
<th>ѧºÅ</th>
</tr>
<tr>
<td>ÕÅÈý< ......
<?php
/*
×÷ÓãºÈ¡µÃ¿Í»§¶ËÐÅÏ¢
²ÎÊý£º
·µ»Ø£ºÖ¸¶¨µÄ×ÊÁÏ
ʹÓãº
$code = new clientGetObj;
1¡¢ä¯ÀÀÆ÷£º$str = $code->getBrowse();
2¡¢IPµØÖ·£º$str = $code->getIP();
4¡¢²Ù×÷ϵͳ£º$str = $code->getOS();
*/
cla ......
½üÀ´Éè¼Æģʽ·çÐУ¬MVCËæ´¦¿É¼û£¬PHPÁìÓòÒ²²»ÀýÍ⣬ºÜ¶àÂÛ̳¶¼¿ªÊ¼ÌÖÂÛÔÚPHPÖÐʹÓÃMVC¡£È»¶ø£¬M¡¢V¡¢CÔÚPHPÖе½µ×¸ÃÈçºÎʵÏÖ£¿MVCÕæµÄÊʺÏPHPô£¿ÕâÀïEasy¸ø³öһЩ×Ô¼ºµÄ˼¿¼¡£
½üÀ´Éè¼Æģʽ·çÐУ¬MVCËæ´¦¿É¼û£¬PHPÁìÓòÒ²²»ÀýÍ⣬ºÜ¶àÂÛ̳¶¼¿ªÊ¼ÌÖÂÛÔÚPHPÖÐʹÓÃMVC¡£È»¶ø£¬M¡¢V¡¢CÔÚPHPÖе½µ×¸ÃÈçºÎʵÏÖ£¿MVCÕæµÄÊʺÏPHP ......
ÔÚjavascript´úÂëÖÐÓÃencodeURIComponent()º¯Êý´¦ÀíÖÐÎÄ×Ö·û´®£¬
JS´úÂ룺
<mce:script type=”text/javascript”><!--
string = encodeURIComponent(string);
location.href = index.php?keyword=’+string;
// --></mce:script>
PHP´úÂë:
<?php
$keyword = (isset($_GET ......