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
sudo apt-get install mysql-server#Ö±½Ó×Ô¶¯»ñµÃ¿ÉÓð汾
Ò²¿ÉÒÔÕâÑùд
sudo apt-geti nstall mysql-server-5.0#°²×°mysql·þÎñÆ÷5.0°æ±¾
°²×°ºó
/etc/init.d/mysqlstart(stop)ΪÆô¶¯ºÍÍ£Ö¹·þÎñÆ÷
/etc/mysql/Ö÷ÒªÅäÖÃÎļþËùÔÚλÖÃmy.cnf
/var/lib/mysql/·ÅÖõÄÊÇÊý¾Ý¿â±íÎļþ¼Ð£¬ÕâÀïµÄmysqlÏ൱ÓÚ ......
tree.js
function getRank(rankNum)
{
var rankName="";
switch(rankNum)
{
case 1:
{
rankName="(ÆÕͨ»áÔ±)";
break;
}
case 2:
{
&n ......
asp,asp.net,php,jspϵÄ301תÏò´úÂë
ʹÓÃ.htaccessÎļþÀ´½øÐÐ301Öض¨Ïò¡£
Èç¹û¿Õ¼ä²»Ö§³Ö.htaccessÎļþ£¬ÄÇôÎÒÃÇ»¹¿ÉÒÔͨ¹ýphp/asp´úÂëÀ´½øÐÐ301Öض¨Ïò¡£
ΪÁ˽«ËÑË÷ÒýÇæµÄ¼Ç¼¸üе½ÏÖÔÚµÄÓòÃûÉÏÃæ,×öÁ˼¸¸ö301Öض¨ÏòµÄ¶«¶«,¸ø´ó¼Ò·ÖÏíÒ»ÏÂ.
asp 301תÏò´úÂë
ÔÚ index.asp »ò default.asp µÄ×²¿¼ÓÈëÒÔ ......
Íü¼ÇMySQL ROOTÃÜÂëÊÇÔÚMySQLʹÓÃÖкܳ£¼ûµÄÎÊÌ⡣ûÏëµ½½ñÌì¾ÍÅöµ½ÕâÑùÒ»¸öÎÊÌ⣺ÄÚ²¿µÄmysqlµÄrootÃÜÂë±»ÐÞ¸ÄÁË¡£²éÔÄ×ÊÁÏ£¬ÓÐÈçÏ·½·¨£º Unix&Linux£º
1.ÓÃroot»òÕßÔËÐÐmysqldµÄÓû§µÇ¼ϵͳ£»
2£®ÀûÓÃkillÃüÁî½áÊøµômysqldµÄ½ø³Ì£»
3£®Ê¹ÓÃ--skip-grant-tables²ÎÊýÆô¶¯MySQL Server
shell& ......
ÔÚ PHP ±à³ÌÔçÆÚ£¬PHP ´úÂëÔÚ±¾ÖÊÉÏÊÇÏÞÓÚÃæÏò¹ý³ÌµÄ¡£¹ý³Ì´úÂë µÄÌØÕ÷ÔÚÓÚʹÓùý³Ì¹¹½¨Ó¦ÓóÌÐò¿é¡£¹ý³Ìͨ¹ýÔÊÐí¹ý³ÌÖ®¼äµÄµ÷ÓÃÌṩijÖ̶ֳȵÄÖØÓá£
µ«ÊÇ£¬Ã»ÓÐÃæÏò¶ÔÏóµÄÓïÑÔ¹¹Ô죬³ÌÐòÔ±ÈÔÈ»¿ÉÒÔ°Ñ OO ÌØÐÔÒýÈëµ½ PHP ´úÂëÖС£ÕâÑù×öÓеãÀ§ÄѲ¢ÇÒ»áʹ´úÂëÄÑÓÚÔĶÁ£¬ÒòΪËüÊÇ»ìºÏ·¶Àý£¨º¬ÓÐα OO Éè¼ÆµÄ¹ý³ÌÓïÑÔ£ ......