Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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  
    //±äÁ¿¶¨Ò壬»­ÍÖÔ²»¡Ê±µÄ½Ç¶È´óС  
    define("ANGLELENGTH",3);  
    /** 
     * »æÖÆͼƬ 
     * @param $title    3DͼµÄ±êÌâ 
......

php Öù״ͼ

<?php
//״ͼ
//http://www.codefans.net
//
function createImage($data,$twidth,$tspace,$height){
                        $dataName = array();
    &nb ......

PHP±¸·ÝÈËÈËÍøÈÕÖ¾½Å±¾ ver 0.1

½ñÌìȷʵÊÇÎÞÁÄÁË£¬Ð´ÁËÒ»¸ö±¸·ÝÈËÈËÍøµÄÈÕÖ¾£¬µ½±¾µØhtmlµÄÀà¡£
Ö÷ÒªÊÇcURLµÇ¼£¬ÕýÔò½âÎöÒ³Ãæ¡£
ʹÓ÷½·¨£¬×îºóÄǸö½Å±¾µÄ×îºóÁ½Ðиĵô£¬ÄãÖªµÀµÄ¡£»òÕßÖØÐÂдһ¸öÔËÐнű¾£º
<?php
include("renren.php");
$test = new renren("ÄãµÄÈËÈËÍøÕ˺Å","ÄãµÄÈËÈËÍøÃÜÂë");
$test->do ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ