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

PHP²Ù×÷AccessÊý¾Ý¿â

9.3  ͨ¹ýPHP²Ù×÷AccessÊý¾Ý¿â
9.3.1  Á¬½ÓAccessÊý¾Ý¿â
ÔÚPHPÖÐÁ¬½ÓAccessÓÐÈçÏÂ3ÖÖ·½Ê½¡£
£¨1£©´´½¨ÏµÍ³Êý¾ÝÔ´£¬ÓÃPHPÌṩµÄODBCº¯Êý
¼´¿É¡£
£¨2£©Í¬Ñù¿ÉÒÔʹÓÃPHPµÄODBCº¯Êý£¬µ«²»´´½¨
Êý¾ÝÔ´¡£¿ª·ÅÊý¾Ý¿âÁ¬½Ó£¨Open DateBase
Conection£¬ODBC£©ÊÇWindows Open
Server£¨¿ª·Å·þÎñ£©API£¨WOSA£©²úÆ·Ö®Ò»¡£Ò»¸öÊý¾ÝÔ´ÊǶÔÊý¾Ý¿âµÄÒ»¸öÃüÃûÁ¬½Ó¡£¶ÔÓÚÓ¦ÓóÌÐòÒªÁ¬½ÓµÄ²»Í¬ÀàÐ͵ÄÊý¾Ý¿â£¬¶¼ÐèÒªÒ»¸öODBC
Çý¶¯³ÌÐò¡£ODBC
APIÖ÷ÒªÊÇΪ¿Í»§/·þÎñÆ÷µÄRDBMSʹÓÃÉè¼ÆµÄ£¬µ«ÊÇODBCÇý¶¯³ÌÐòÒ²¿ÉÒÔÓÃÓÚÁ¬½Ó×ÀÃæÊý¾Ý¿âÎļþ¡¢¹¤×÷±íºÍƽÃæÎļþ¡£ODBCʹÓÃ
Odbcinst.dll¿âÀ´ÉèÖúÍÇå³ýÊý¾ÝÔ´¡£Odbcad32.exeÊÇÒ»¸öÓÃÓÚ½¨Á¢ODBCÊý¾ÝÔ´µÄ¶ÀÁ¢µÄ32λ¿ÉÖ´ÐÐÓ¦ÓóÌÐò£¬ÔÚ¿ØÖÆÃæ°åÖÐÓÐÆä
¶ÔÓ¦µÄͼ±êControl
Panel¡£
ODBCÇý¶¯¹ÜÀí³ÌÐòΪÊý¾ÝÔ´´ò¿ªODBCÇý¶¯³ÌÐò
²¢½«SQLÓï¾ä´«Ë͸øÇý¶¯³ÌÐò¡£ÔÚ¿Í»§/·þÎñÆ÷RDBMS´¦ÀíÍêÒ»¸öselect²éѯºó£¬ODBCÇý¶¯³ÌÐò½«Öµ·µ»Ø¸øÓ¦ÓóÌÐò¡£µ±Ö´ÐÐÒ»¸öinsert¡¢
update»òdeleteÓï¾äʱ£¬Çý¶¯³ÌÐò·µ»Ø²éѯËùÓ°ÏìµÄÐÐÊý¡£
ÏÂÃæ½éÉÜPHPʹÓÃODBCÁ¬½ÓAccessÊý
¾Ý¿âµÄ·½·¨¡£ÓÃ$connstr="DRIVER= Microsoft Access Driver
(*.mdb)À´ÉèÖÃÊý¾ÝÇý¶¯£¬º¯Êýrealpath()ÓÃÀ´È¡µÃÊý¾Ý¿âµÄÏà¶Ô·¾¶¡£ÀûÓø÷½·¨Á¬½ÓAccessÊý¾Ý¿âÖ÷ÒªÓ¦Óõ½PHPµÄ
odbc_connect()º¯Êý£¬¸Ãº¯ÊýÉùÃ÷ÈçÏ£º
resourse odbc_connect( string dsn, string user,
string password [, int cursor_type])
dsn£ºÏµÍ³dsnÃû³Æ¡£
user£ºÊý¾Ý¿â·þÎñÆ÷ijÓû§Ãû¡£
password£ºÊý¾Ý¿â·þÎñÆ÷ijÓû§ÃÜÂë¡£
cursor_type£ºÓαêÀàÐÍ¡£
´úÂëÈçÏ£º
$connstr="DRIVER=Microsoft Access Driver
(*.mdb);
DBQ=".realpath("bookinfo.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC
);
£¨3£©Ê¹ÓÃ΢ÈíµÄADODBÊý¾Ý¿âÇý¶¯¡£
ActiveX Data Objects£¨ADO£©ÊÇMicrosoft¿ª·ÅÊý¾Ý¿âÓ¦ÓóÌÐòµÄÊý¾Ý¿â·ÃÎʼ¼Êõ¡£Ëü±»Éè¼ÆÓÃÀ´Í¬ÐµÄÊý¾Ý·ÃÎʲãOLE
DB ProviderÒ»ÆðЭͬ¹¤×÷£¬ÌṩͨÓÃÊý¾Ý·ÃÎÊ£¨Universal Date Access£©¡£OLE
DBÊÇÒ»¸öµÍ²ãµÄÊý¾Ý·ÃÎʽӿڣ¬ÓÃËü¿ÉÒÔ·ÃÎʸ÷ÖÖÊý¾ÝÔ´£¬°üÀ¨´«Í³µÄ¹ØϵÐÍÊý¾Ý¿â¡¢µç×ÓÓʼþϵͳ¼°×Ô¶¨ÒåµÄÉÌÒµ¶ÔÏó¡£ADO¼¼Êõ´ó´ó¼ò»¯ÁËOLE
DBµÄ²Ù×÷£¬ÒòΪADO·â×°ÁËOLE
DB³ÌÐòÖÐʹÓõĴóÁ¿COM½Ó¿Ú£¬ËùÒÔADOÊÇÒ»Öָ߲ãµÄ·ÃÎʼ¼Êõ¡£
ADO¼¼Êõ»ùÓÚͨÓöÔÏóÄ£ÐÍ£¨COM£©£¬ËüÌṩÁ˶à
ÖÖÓïÑ


Ïà¹ØÎĵµ£º

phpÀ¬»ø»ØÊÕ»úÖÆ

ÿһÖÖÓïÑÔ¶¼ÓÐ×Ô¼ºµÄ×Ô¶¯À¬»ø»ØÊÕ»úÖÆ£¬ÈóÌÐòÔ±²»±Ø¹ý·Ö¹ØÐijÌÐòÄÚ´æ·ÖÅ䣬µ«ÊÇÔÚOOPÖУ¬ÓÐЩ¶ÔÏóÐèÒªÏÔʽµÄÏú»Ù£»·ÀÖ¹³ÌÐòÖ´ÐÐÄÚ´æÒç³ö¡£
Ò»¡¢PHP À¬»ø»ØÊÕ»úÖÆ(Garbage Collector ¼ò³ÆGC)
ÔÚPHPÖУ¬Ã»ÓÐÈκαäÁ¿Ö¸ÏòÕâ¸ö¶ÔÏóʱ£¬Õâ¸ö¶ÔÏó¾Í³ÉΪÀ¬»ø¡£PHP»á½«ÆäÔÚÄÚ´æÖÐÏú»Ù£»ÕâÊÇPHP µÄGCÀ¬»ø´¦Àí»úÖÆ£¬·ÀÖ¹ÄÚ´æÒç³ö¡ ......

PHPÖеÄħÊõ·½·¨

PHPÖÐÓÐÏÂÁгÆ֮ΪħÊõ·½·¨(magic method)µÄº¯Êý:__construct, __destruct ,
__call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup,
__toString, __set_state, __clone and __autoload,±¾ÎÄʹÓÃ__callΪʵÏÖÒ»¸öÉí·ÝÑéÖ¤µÄ¼òµ¥ÊµÀý£¬´úÂëÈçÏ£º ´úÂë<?php
    interfa ......

php½«excelµ¼Èëmysql

£¨×ª×Ôhttp://www.jb51.net/article/20829.htm£©
ÕâÀï½éÉÜÒ»¸öÖ±½Ó½«excelÎļþµ¼ÈëmysqlµÄÀý×Ó¡£ÎÒ»¨ÁËÒ»ÍíÉϵÄʱ¼ä²âÊÔ£¬ÎÞÂÛµ¼Èë¼ò·±Ì嶼²»»á³öÏÖÂÒÂ룬·Ç³£ºÃÓá£
PHP-ExcelReader,ÏÂÔصØÖ·: http://sourceforge.net/projects/phpexcelreader
˵Ã÷£º
²âÊÔ»·¾³£ºMYSQLÊý¾Ý¿â²ÉÓÃutf8±àÂë.µ¼ÈëEXCELÎĵµÊÇxls¸ñʽ,¾­¹ ......

php JSON ÖÐÎÄÂÒÂë½â¾ö·½°¸

<?php
// ½«Êý×éת»»³ÉJson¸ñʽ£¬ÖÐÎÄÐèÒª½øÐÐURL±àÂë´¦Àí
function Array2Json($array) {
    arrayRecursive($array, 'urlencode', true);
    $json = json_encode($array);
    $json = urldecode($json);
    // extÐèÒª²»´øÒýºÅµÄboolÀàÐÍ
&n ......

phpÉú³Éexcel

excelÕâÀàÎļþÆäʵ¾ÍÊÇÌØÊâ¸ñʽµÄÎı¾Îļþ£¨Ó¦¸ÃËùÓиñʽ¶¼ÊÇÌØÊâ¸ñʽµÄÎı¾ÎļþºÍ¶þ½øÖÆÎļþ£©£¬
excel²»Í¬µÄÐÐÌåÏÖÔÚÎı¾ÖеĻ»ÐУ¬ÀïÃæµÄÐèҪתÒåµÄ×Ö·û°üÀ¨,\ºÍ\r\nÕâÁ½¸ö£¬Óöµ½ÕâЩ×Ö·ûµÄʱºòÕâ¸öµ¥Ôª¸ñÐèÒªÓÃ""¸ñ¿ª ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ