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

PHP²éѯÏÔʾSqlServerÖеÄÖÐÎÄ

ÒòΪ¹¤×÷ÐèÒª£¬Êý¾Ý¿âʹÓõÄMS SQL Server2005£¬¶øÄ¬ÈϵÄÅÅÐò¹æÔòÊÇSQL_Latin1_General_CP1_CI_AS¡£´´½¨ÁËÒ»¸ö±í£¬ÒòΪÐèÒª´æ´¢ÖÐÎÄÐÅÏ¢£¬Address×ֶεÄÀàÐÍÊÇnvarchar(255)¡£
´ËʱʹÓÃphpÀ´Á¬½Ósql server£¬Ò³ÃæµÄ±àÂëºÍÎļþµÄ±àÂë¶¼ÊÇUTF-8£¬²éѯ´ËAddress×ֶΣ¬ÏÔʾÔÚÒ³ÃæÉÏÊÇ???Ö®ÀàµÄ¡£Ôõô½â¾ö£¿
ʹÓÃ
iconv('iso-8859-1','utf-8',$address);

ÊÇûÓÐʲôÓô¦µÄ¡£
´ËʱÈç¹ûSQLÒ»Óï¾äÖÐÖ¸¶¨×Ö·ûÅÅÐò¹æÔòΪÖÐÎÄÔÙ½øÐÐת»»Êä³öµÄ²ÅÊÇÕý³£µÄ£º
$query = 'select Address collate Chinese_PRC_CI_AS from A';
$rs = mssql_query($query,$conn) or die ('Query failed: '.$query);
if ($row = mssql_fetch_array($rs))
{
$address = $row[0];
$address = iconv('GBK','UTF-8',$address);
echo $address;
}

»¹ÓÐÆäËü·½·¨Âð£¿


Ïà¹ØÎĵµ£º

ÎåÖÖ³£¼ûµÄ PHP Éè¼ÆÄ£Ê½

Éè¼ÆÄ£Ê½ Ò»Ê齫Éè¼ÆÄ£Ê½ÒýÈëÈí¼þÉçÇø£¬¸ÃÊéµÄ×÷ÕßÊÇ Erich Gamma¡¢Richard Helm¡¢Ralph Johnson ºÍ John Vlissides Design£¨Ë×³Æ “ËÄÈ˰©¡£Ëù½éÉܵÄÉè¼ÆÄ£Ê½±³ºóµÄºËÐĸÅÄî·Ç³£¼òµ¥¡£¾­¹ý¶àÄêµÄÈí¼þ¿ª·¢Êµ¼ù£¬Gamma µÈÈË·¢ÏÖÁËijЩ¾ßÓй̶¨Éè¼ÆµÄģʽ£¬¾ÍÏñ½¨ÖþʦÉè¼Æ·¿×Ӻͽ¨ÖþÎïÒ»Ñù£¬¿ÉÒÔΪԡÊÒµÄλÖûò ......

PHPÍøÕ¾¿ª·¢·½°¸£¨¿ª·¢ÐÂÈ˱ضÁ£©

Ò»¡¢¿ª·¢³ÉÔ±
a)ÏîÄ¿Ö÷¹Ü
b)Ò³ÃæÃÀ¹¤
c)Ò³Ãæ¿ª·¢
d)·þÎñ¶Ë³ÌÐò¿ª·¢
e)ϵͳÓëÊý¾Ý¹ÜÀí
f)²âÊÔÓë°æ±¾¿ØÖÆ
¶þ¡¢ ÍøÕ¾×鿪·¢¼òÃ÷Á÷³Ì
Èý¡¢ ¿ª·¢¹¤¾ßÓë»·¾³
a)·þÎñÆ÷ÅäÖÃ
i. WEB·þÎñÆ÷£º FreeBSD6.1+Apache2.0+PHP5.0£¬SVN°æ±¾¿ØÖÆ·þÎñ(½ö²âÊÔ»ú)¡£
ii.Êý¾Ý¿â·þÎñÆ÷£º WIN2003 server+SQL server  ......

php+ajaxÖÐÖÐÎÄÊä³ö£¯ÊäÈëÂÒÂëÎÊÌâ

ÏÈ˵ͨ¹ýjavascript·¢ËÍʱµÄÂÒÂëÎÊÌ⣬Èç¹û·¢Ë͵ÄÊÇÖÐÎÄ£¬¾ÍÒªÓÃescapeÕâ¸öº¯Êý´¦Àí£¬±ÈÈ磺
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl.php?name="+"¸Õ¸Õ";
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
ÄÇô¾ÍÒª¸Ä³É
£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½£½
var url="testurl. ......

½«PHP´úÂëת»»µ½Scala´úÂë

ÓÐÒ»¸ö¿ªÔ´ÏîÄ¿Ìṩ½«PHP´úÂëת»»³ÉScala´úÂëµÄ¹¦ÄÜ£¬¸ÃÏîÄ¿µÄÍøÕ¾ÊÇ http://code.google.com/p/php-to-scala-migration-helper/¡£
In short, php-to-scala converts PHP code to clean, maintainable Scala source code. To cut to the chase, see ConversionExamples, or the feature-by-feature DesignD ......

¡¾×ª¡¿¸ß¼¶PHPÓ¦ÓóÌÐò©¶´ÉóºË¼¼Êõ

ǰÑÔ
PHPÊÇÒ»ÖÖ±»¹ã·ºÊ¹ÓõĽű¾ÓïÑÔ£¬ÓÈÆäÊʺÏÓÚweb¿ª·¢¡£¾ßÓÐ¿çÆ½Ì¨£¬ÈÝÒ×ѧϰ£¬¹¦ÄÜÇ¿´óµÈÌØµã£¬¾Ýͳ¼ÆÈ«ÊÀ½çÓг¬¹ý34%µÄÍøÕ¾ÓÐphpµÄÓ¦Ó㬰üÀ¨Yahoo¡¢sina¡¢163¡¢sohuµÈ´óÐÍÃÅ»§ÍøÕ¾¡£¶øÇҺܶà¾ßÃûµÄwebÓ¦ÓÃϵͳ£¨°üÀ¨ bbs,blog,wiki,cmsµÈµÈ£©¶¼ÊÇʹÓÃphp¿ª·¢µÄ£¬Discuz¡¢phpwind¡¢phpbb¡¢vbb¡¢wordpress¡¢boblog µÈµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ