所以我使用访问数据库(* mdb).
这个我的代码和成功连接:
这个我的代码和成功连接:
$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\blabla.mdb'; $db['test']['username'] = ''; $db['test']['password'] = ''; $db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\blabla.mdb'; $db['test']['dbdriver'] = 'odbc'; $db['test']['dbprefix'] = ''; $db['test']['pconnect'] = TRUE; $db['test']['db_debug'] = TRUE; $db['test']['cache_on'] = FALSE; $db['test']['cachedir'] = ''; $db['test']['char_set'] = 'utf8'; $db['test']['dbcollat'] = 'utf8_general_ci'; $db['test']['swap_pre'] = ''; $db['test']['autoinit'] = TRUE; $db['test']['stricton'] = FALSE;
现在我想从其他电脑使用accessdb.
这个accessdb(* mdb)已经被共享,我制作地图网络驱动器(Z :).
所以我改变了主机名和数据库,但它失败了:
$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:\blabla.mdb'; $db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=Z:\blabla.mdb';
我尝试这样做:
$db['test']['hostname'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=\\10.0.0.107\share\blabla.mdb'; $db['test']['database'] = 'Driver={Microsoft Access Driver (*.mdb)};DBQ=\\10.0.0.107\share\blabla.mdb';
但它仍然错误:
Unable to connect to your database server using the provided settings. Filename: D:\folder\folder\system\database\DB_driver.PHP Line Number: 124
甚至我尝试连接PHP
这是php using msaccess的结果