Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 Öиö±ðÓ÷¨»ã¼¯(Óõ½¸üÐÂ)

¸ö±ð·ûºÅ
@£ºº¯ÊýÇ°¼Ó@·ûºÅ¿ÉÒÔÆÁ±Î¸Ãº¯ÊýÈç¹û·¢Éú´íÎóµÄ±¨´íÐÅÏ¢£¬È磺@file_put_contents("1.txt", "Hello World!", FILE_APPENDS); ÕâÀïµÄFILE_APPENDS³£Á¿¸ù±¾¾ÍûÓУ¬µ«ÊǸÃÓï¾äÖ´ÐÐʱ²»»á±¨´í£¬Èç¹ûÇ°ÃæÈ¥µô@£¬Ôò»á±¨³ö²ÎÊý´íÎó¡£
#£º¾ÍÊÇPHPÖеÄÐÐ×¢ÊÍ£¬Ó÷¨×÷Óøú // Ò»Ñù¡£ÕÒ±é PHP ²Î¿¼ÖÐûÓÐÌáµ½¡£
תÒå ......

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

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

PHP CURLÏê½â

ÉùÃ÷£º²¹³ä·­ÒëÁËÔ­ÌûÖм¸´¦Î´·­Òë´¦¡£
---------------------------------------------------- תÌû¿ªÊ¼ -------------------------------------------------------
PHPÖеÄCURLº¯Êý¿â£¨Client URL Library Function£© 
curl_close - ¹Ø±ÕÒ»¸öcurl»á»° 
curl_copy_handle - ¿½±´Ò»¸öcurlÁ¬½Ó×ÊÔ´µÄËùÓÐÄÚÈݺ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ