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

PHP+MySQLÂÒÂëµÄ½â¾ö

ÔÚDOSÖнøÐÐMySQLµÄ·ÃÎÊ¿ÉÄÜÂÒÂëµÄÇé¿öÓÐÈýÖÖ£¬
    Ê×ÏÈ£¬Òª×öµÄÊǼì²éMySQLµÄÅäÖ㬰²×°µÄʱºòÑ¡Ôñutf-8µÄÓïÑÔ»·¾³»áÊ¡È¥ºÜ¶àµÄÂé·³
1. ¼ì²éMySQLµÄ·þÎñ¶Ë¡¢¿Í»§¶ËµÄÓïÑÔÉèÖÃÊÇ·ñΪ“utf8”£¬²»ÊǵĻ°ÊÖ¶¯½«my.int¸ü¸Ä¹ýÀ´£»
2. ÔÚPHP½øÐеÚÒ»´Îmysql_query֮ǰÉèÖÃʹÓÃÁ¬½ÓµÄ×Ö·û¼¯Îª"SET NAMES 'utf8'"£¬¼´mysql_query("SET NAMES 'utf8'");ºÜ¶àÈË×öµ½ÕâÀï¾Í¿ÉÒÔ¿´µ½ºº×ÖÁË£»
3. ÉèÖÃdatabaseµÄ×Ö·û¼¯——ÀýÈ磬CREATE DATABASE dmsdb DEFAULT CHARACTER SET utf8 COLLATE utf8_bin£¬ÕâÑùʹÓÃshow full column from tablename²éµ½µÄVARCHARµÄCOLLATE²ÅÊÇutf8_binÀàÐ͵ģ»
    Æä´Î£¬Ó¦¸Ã·¢ÏÖÔٴβéѯµÄ½á¹û×Ö·û´®ÓÐÁ˱仯£¬ÕâʱÈç¹ûÓÐÐí¶àµÄÈÕÎÄ×Ö·û³öÏÖ£¬ÔÙ¿´PHP.iniµÄÉèÖãº
phpÖÐÒª¶Ôphp.iniÎļþÖÐline 637: extension=php_mbstring.dll Ç°µÄ·ÖºÅ³ýµô£¬²¢ÇÒ±ØÐèÐÞ¸Ämb_stringµÄÏà¹Ø±àÂëÅäÖã¬Ð޸ĺóµÄÄÚÈÝΪ£º
line 1164: mbstring.language = utf-8
line 1169: mbstring.internal_encoding = utf-8
line 1172: mbstring.http_input = auto
line 1176: mbstring.http_output = utf-8
line 1183: mbstring.encoding_translation = On
line 1187: mbstring.detect_order = auto
line 1191: mbstring.substitute_character = utf-8;
line 1201: mbstring.func_overload = 1
£¨ËùÓÐÐкžù¶ÔÓ¦µÄÊÇphp5.1.6 °æ±¾µÄphp.ini-recommand£©
    µ±´ËʱÉèÖÃÍê³ÉºóÎÒÔÚdosÀï½øÐвéѯ²Ù×÷»¹ÊÇ»á³öÏÖÂÒÂëµÄÐÎʽ£¬ÕâʱҪ¿¼ÂÇdosµÄÉèÖÃÎÊÌâÁË£¬
ÔÚShell>mysql --default-character-set=gbk -u root -p£¬Ó¦¸ÃÔÙ½øÐвéѯ¾Í»áÏÔʾ³öÍêÃÀµÄºº×ÖÁË£¡


Ïà¹ØÎĵµ£º

³õѧPHP½Ó¿Ú

¼Ì³ÐÌØÐÔ¼ò»¯Á˶ÔÏó£¬ÀàµÄ´´½¨£¬Ôö¼ÓÁË´úÂëµÄÖØÓÃÐÔ¡£µ«ÊÇPHPÖ®Ö§³Öµ¥¼Ì³Ð¡£Èç¹ûÏëʵÏÖ¶à¼Ì³ÐµÄ»°¾ÍÒªÓõ½PHPµÄ½è¿Ú¡£PHP¿ÉÊÇʵÏÖ¶à¸ö½Ó¿Ú¡£
²»ÒªÓÃpublicÒÔÍâµÄ¹Ø¼ü×ÖÀ´ÐÞÊνӿÚÖеÄÀà³ÉÔ±¡£¶ÔÓÚ·½·¨£¬²»Ð´¹Ø¼ü×ÖÒ²¿ÉÒÔ¡£ÕâÊÇÒ»¸ö½è¿ÚÀà×ÔÉíµÄÌìÐÔ¾ö¶¨µÄ¡£ÄÇôÎÒÏëËûÊÇΪʲôÄØ£¿
¶ÔÓÚ½Ó¿ÚÀ´Ëµ£¬Ëü²»ÄÜÓÃprotected,ºÍpr ......

¹ØÓÚphpÃæÏò¶ÔÏóµÄ¾²Ì¬±äÁ¿µÄÎÊÌâ


´úÂëÈçÏ£º
<?php
class Book{
    static $num=0;
    public function showme(){
        echo 'ÄúÊǵÚ'.self::$num.'λ·Ã¿Í';
        self::$num++;
     ......

ʹÓÃlinux¹²ÏíÄÚ´æµÄʵÏÖµÄphpÄÚ´æ¶ÓÁÐ

<?php
/**
* ʹÓù²ÏíÄÚ´æµÄPHPÑ­»·ÄÚ´æ¶ÓÁÐʵÏÖ
* Ö§³Ö¶à½ø³Ì, Ö§³Ö¸÷ÖÖÊý¾ÝÀàÐ͵Ĵ洢
* ×¢: Íê³ÉÈë¶Ó»ò³ö¶Ó²Ù×÷,¾¡¿ìʹÓÃunset(), ÒÔÊÍ·ÅÁÙ½çÇø
*
* @author wangbinandi@gmail.com
* @created 2009-12-23
*/
class SHMQueue
{
private $maxQSize = 0; // ¶ÓÁÐ×î´ó³¤¶È

private $front = 0; ......

php + mysq + linux УÈËÊ´¦ÍøÕ¾

ÒÔÇ°Ò»Ö±¸ãC++½øÐÐC/S¿ª·¢£¬Ôø¾­µÄÏë·¨ÊÇÈç¹ûÓлú»á£¬Ñ§Ñ§¸ãÍøÕ¾ºÍǶÈëʽ¿ª·¢
ûÏëµ½ÕÒµ½¹¤×÷µÄµÚ2Ìì¾ÍÓÐÁË×öÍøÕ¾µÄ»ú»á£¬Ò²×¬µ½ÁË×Ô¼º´óѧÆÚ¼ä×î¸ßµÄÒ»·Ý¹¤×Ê£¬10Ìì1000¿é
ÔÚʲôµÄ¶¼²»»áµÄÇé¿öÏ£¬¾¡È»´ðÓ¦ÈËÊ´¦µÄÀÏʦһ¸öÐÇÆÚдºÃÍøÕ¾µÄºǫ́
ÎÒ³ÐÈÏÕÒµ½¹¤×÷ºó×Ô¼ºÊÇÓеã¿ñÁË£¬ºÜ¶àÊÂûעÒâµ½£¬ºÜ¶àʺó»Ú²»ÁË¡£¡£¡£ ......

mysql ÖÐÎÄÂÒÂë

mysql Ŀ¼Ï嵀 my.ini ÓÐÁ½´¦ÒªÐÞ¸Ä Ò»´¦ÊÇ [mysql] default-character-set=gbk »¹ÓÐÒ»´¦ÊÇ·ñÈϽ¨±íʱʹÓõÄ×Ö·û¼¯ default-character-set=gbk Á½´¦ÐÞ¸Äһϣ¬ÖØн¨Á¢Êý¾Ý¿âºÍ±íºó¾Í²»»á³öÏÖÂÒÂëÁË¡£ ½¨±íʱҲ¿ÉÒÔÖ¸¶¨Êý¾Ý¿â»ò±íËùʹÓõÄ×Ö·û¼¯ Èç¹û²»ÄÜÖؽ¨Êý¾Ý¿âÔòÖ»ÄÜÔÚÖ¸¶¨µÄÊý¾Ý¿âĿ¼Ï°ѶÔÓ¦µÄ db.opt À ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ