Home  >  Article  >  Backend Development  >  php linux access解决办法

php linux access解决办法

WBOY
WBOYOriginal
2016-06-13 10:35:201107browse

php linux access
各位大侠:
  现有一access数据库在linux系统下,想通过php进行操作,如何建立连接,我试过用com,发现必须在windows下才能使用;用odbc连接,网页只是一片空白;下面是我的odbc连接的代码:
  $constr="driver=Microsoft Access Driver(*.mdb);dbq=db.mdb";
  $conid=odbc_connect($constr,"","",SQL_CUR_USE_ODBC);
  $exec=odbc_exec($conid,"select * from test");
  while($row=odbc_fetch_array($exec))
  {
  echo $row["field1"];
  echo $row["field2"];
  echo $row["field3"];
  ..........
  }
?>
可运行之后网页上面却是一片空白,请哪位大侠告诉我,在linux下用PHP利用ODBC操作access数据库需要进行哪些设置,最好全面一些,我现在真不知怎么办。
或者哪位大侠还有更好的方法来连接access数据库
现在必须是操作access数据库,所以请建议使用mySQL的朋友就免开尊口吧。
谢谢各位大侠了!!!

------解决方案--------------------
确认一下,你LINUX系统里装ODBC组件了吗?
------解决方案--------------------
liunx下想用access基本没戏,一定要的话就搞ODBC吧。
------解决方案--------------------
建议你先搜索一下 linux+odbc

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