Home  >  Article  >  Backend Development  >  PHP ODBC连接ACCESS数据库失败解决方案

PHP ODBC连接ACCESS数据库失败解决方案

WBOY
WBOYOriginal
2016-06-13 12:20:341506browse

PHP ODBC连接ACCESS数据库失败
$connstr="DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=".realpath("C:\Users\btang\xampp\htdocs\InterfaceSatcli\BdD_DO.mdb");
$connid=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC);
echo phpinfo();

} catch ( Exception $e ) {
  echo "Connection ?  Access impossible : ", $e->getMessage();
  die();
}

?>


------解决思路----------------------
连接 ACCESS 需要 mdb 文件所在目录有一般用户执行权,请检查
------解决思路----------------------
这不能说明什么,你需要查看一下权限属性
php 是以匿名用户工作的,属于 users 组

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn