php ajax mysql±àÂëgb2312
1¡¢PHP·¢ËÍÖÐÎÄ¡¢Ajax½ÓÊÕ
Ö»ÐèÔÚphp¶¥²¿¼ÓÈëÒ»¾ä£º
header('Content-type: text/html;charset=GB2312');
xmlHttp»áÕýÈ·½âÎöÆäÖеÄÖÐÎÄ¡£
2¡¢Ajax·¢ËÍÖÐÎÄ¡¢PHP½ÓÊÕ
Õâ¸ö±È½Ï¸´ÔÓ£º
AjaxÖÐÏÈÓÃencodeURIComponent¶ÔÒªÌá½»µÄÖÐÎĽøÐбàÂë
PHPÖУº
$GB2312string=iconv( ‘UTF-8′, ‘gb2312//IGNORE’ , $RequestAjaxString);
3¡¢PHPдÈëMySQLÊý¾Ý¿â
½¨Á¢connʱ£¬queryÒ»ÏÂset names “gb2312″
Ïà¹ØÎĵµ£º
ÓÉÓÚÏîÄ¿ÐèÒª,¶Ômysql·Ö²¼ÊÂÎñÓÐÒ»¶¨ÒªÇó.ÕâÀïÏȼòµ¥ËµÃ÷±ØÒª.
¼ÙÉè,ÈÕ³£²ÆÎñÖÐ,ÒªÍê³ÉÒ»¸öÓµ»¤¶©¹º,±ØÐ뽫¶¨µ¥²Ù×÷ºÍ²ÆÎñ²Ù×÷·âÔÚÒ»¸öÊÂÎñÖвÅÄܱ£Ö¤½»Ò×ÍêÕûÐÔ.
Èç¹û¶¨µ¥ºÍ²ÆÎñÊý¾Ý¶¼·Ö²¼ÔÚ¸÷×ÔµÄʵÀýÖÐ,Ôò±ØÐëÓ÷ֲ¼ÊÂÎñ²ÅÄÜÂú×ã.
·Ï»°²»¶à£¬½øÈë·Ö²¼ÊÂÎñ̽Ë÷¡£
(±¾ÎÄÀý×ÓÀ´×ÔÍøÂ磬±¾ÎÄÖ»×¢ÖØ̽Ë÷£©
1.ÔÚ±¾»ú loca ......
TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃʵÀý(mysqlÊý¾Ý¿â)
TomCat6.0Êý¾Ý¿âÁ¬½Ó³ØÅäÖÃÓм¸ÖÖ·½Ê½£¬ÔÚÕâÀïÎÒÖ»½éÉÜÆäÖеÄÒ»ÖÖ¹©´ó¼Ò²Î¿¼£º
ÏÂÃæÎÒ°ÑÅäÖùý³Ì·Ö³ÉÈý¸ö²½ÖèÀ´Íê³É£º
µÚÒ»²½£ºÔÚÄã°²×°TomCatµÄĿ¼ÏÂÕÒµ½context.xmlÅäÖÃÎļþ¡££¨ÀýÈ磺D:\Tomcat 6.0\conf\context.xml£©È»ºó´ò¿ªcontext.xml£¬ÔÚ±êÇ©<context>< ......
/**
* Ajax²Ù×÷º¯Êý
*
* @param url -- ·þÎñÆ÷¶ËÒ³ÃæµØÖ·
* @param param -- ²ÎÊý£¬ÀàËÆ 'user=123&id=100'
* @param method -- ÇëÇó·þÎñÆ÷¶ËµÄ·½·¨,GetºÍPostÁ½ÖÖ£¬Ä¬ÈÏÊÇGET
* @param response -- ÊÇ·ñ»ñÈ¡·þÎñÆ÷¶Ë·µ»ØµÄ½á¹û£¬Ä¬ÈÏÊÇtrue
*/
function ajax( url, param, method, response ){
//set defaul ......
ÔÎĵØÖ·¡¿Announcing the Microsoft AJAX CDN
¡¾ÔÎÄ·¢±íÈÕÆÚ¡¿ Tuesday, September 15, 2009 11:46 PM
½ñÌìÔçЩʱºò£¬ASP.NET¿ª·¢ÍŶÓÍƳöÁËÒ»¸öеÄ΢ÈíAjax CDN£¨Content Delivery Network£¬ÄÚÈÝ·Ö·¢ÍøÂ磩·þÎñ£¬¸Ã·þÎñÌṩÁ˶ÔAJAX¿â£¨°üÀ¨jQuery ºÍ ASP.NET AJAX£©µÄ»º´æÖ§³Ö¡£¸Ã·þÎñÊÇÃâ·ÑµÄ£¬²»ÐèÈκÎ×¢² ......
Ò» ÒýÌâ
ÈçºÎÈÃweb³ÌÐòÓÃÆðÀ´Ïñ×ÀÃæÓ¦ÓóÌÐòÒ»Ñù¼òµ¥£»
ÅÖ¿Í»§¶Ë£¿ÊÝ¿Í»§¶Ë£¿ÈçºÎÑ¡Ôñ£¿-----¿´ÐèÇ󣬿´Óû§µÄʹÓã¬Áé»îµ÷½Ú¡£
²»ÒªÉÁ˸£¬¿Õ°×Ò³³öÏÖ£¿
¶þ ³õʶAjax
1. AjaxÊÇÒ»¸ö¿Í»§¶Ë¼¼Êõ£¬²»ÂÛÄãÏÖÔÚʹÓúÎÖÖ·þÎñÆ÷¶Ë¼¼Êõ£¬¶¼ÄÜʹÓÃAjax£¬¶ø²»¹ÜʹÓõÄÊÇJava¡¢.NET¡¢Ruby¡¢PHP»¹ÊÇCGI¡ ......