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

PHP mysqlÊÂÎñ´¦Àí »Ø¹ö²Ù×÷

MYSQLÖÐÖ»ÓÐINNODBºÍBDBÀàÐ͵ÄÊý¾Ý±í²ÅÄÜÖ§³ÖÊÂÎñ´¦Àí£¡ÆäËûµÄÀàÐÍÊDz»Ö§³ÖµÄ£¡
$lnk = mysql_connect("localhost", "root", "");
mysql_select_db("test");
mysql_query("BEGIN");
$query = mysql_query("INSERT INTO test VALUES(1, 'yangjun')");
$q1 = mysql_error();
mysql_query("INSERT INTO test VALUES(1, 'yangjun')");
$q2 = mysql_error();
mysql_query("INSERT INTO test VALUES(2, 'Ñî¿¡')");
$q3 = mysql_error();
if (!$q1 && !$q2 && !$q3) {
mysql_query("COMMIT"); //È«²¿³É¹¦£¬Ìá½»Ö´Ðнá¹û
} else {
mysql_query("ROLLBACK"); //ÓÐÈκδíÎó·¢Éú£¬»Ø¹ö²¢È¡ÏûÖ´Ðнá¹û
}
var_dump($q1, $q2, $q3);


Ïà¹ØÎĵµ£º

PHP½âÒÉ

PHP½âÒÉ
1. ´úÂëÖØÓ÷½·¨include()ºÍrequire()º¯Êý²îÒ죿
1) Require()º¯Êý
ʹÓÃrequier()°üº¬ÍⲿphpÎļþʱ£¬Ö»Òª×ÔÉíphpÎļþ±»Ö´ÐУ¬ÍⲿÎļþµÄÄÚÈݾͽ«±»°üº¬½ø¸Ã×ÔÉíphpÎļþ£¬µ±°üº¬µÄÍⲿÎļþ·¢Éú´íÎóʱ£¬ÏµÍ³½«¸ø³ö´íÎóÌáʾ£¬²¢ÇÒÍ£Ö¹phpÎļþµÄÖ´ÐС£
ʾÀý£º
µ÷ÓÃÎļþconfig.incµÄ³ÌÐò´úÂ룺
<?php  ec ......

phpµÄ¼¸¸ö²»Ì«³£Óõĺ¯Êý

class_exists — Åж¨Ò»¸öÀàÊÇ·ñÒѾ­±»¶¨Òå
get_class_methods — »ñȡij¸öÀàÖÐËùÓз½·¨µÄÃû³Æ
get_class_vars — »ñȡһ¸öÀàÖÐËùÓеÄÌØÐÔ
get_class — ·µ»ØÒ»¸ö·½·¨ËùÔÚµÄÀàÃû
get_declared_classes — ÏÔʾÒѶ¨ÒåµÄÀàµÄÐÅÏ¢
get_declared_interfaces — ÏÔʾÒѶ¨ÒåµÄ½Ó¿ÚµÄÐÅÏ¢
get ......

PHP 6½«È«ÃæÖ§³ÖUnicodeºÍ¹ú¼Ê»¯

 PHPChinaѶ£ºPHPºËÐÄ¿ª·¢ÕßAndrei ZmievskiÔÚ×î½ü¾ÙÐеÄ2009 Zend/PHP»áÒéµÄÖ÷Ìâ·¢ÑÔÖÐÌá³ö£º“ÔÚ½ÓÏÂÀ´µÄPHP6ÖØÒªÉý¼¶ÖУ¬½«Í¨¹ýÖ§³ÖUnicodeÀ´°ïÖú¿ª·¢ÕßÃÇд³öÄܹ»²¿Êðµ½¶à¸ö²»Í¬ÓïÑÔÊг¡µÄÓ¦ÓóÌÐò¡£”
¡¡¡¡ÉÌÒµ¿ª·¢ÖÐÈç¹ûÖ»ÊÇ¿ª·¢ÎªÌØÓïÑÔÊг¡µÄÓ¦ÓóÌÐò£¬¾Í»áʧȥÆäËûµØ·½µÄÉÌÒµ»ú»á¡£ÔçÔÚ2006Äê4Ô£ ......

mysqlÖ÷´ÓÊý¾Ý¸´ÖÆ

Ò»¡¢Îª´ÓÊý¾Ý¿âÉèÖø´ÖÆÕ˺Å
grant REPLICATION SLAVE on *.* To 'backup'@'%' identified by 'backuppwd'
flush privileges
 
¶þ¡¢µ¼³öÊý¾Ý
(1)Ö±½Ó¸´ÖÆÊý¾ÝÎļþĿ¼·½·¨
a. Í£Ö¹Êý¾Ý¿âдÊý¾Ý
flush tables with read lock
b.ÏÔʾ´ËʱmasterµÄ״̬
show master status
¼ÆÏ´ËʱÖ÷Êý¾Ý¿âµÄbinlogµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ