php如何连接access和sql anywhere数据库?

csdnpro 2006-07-10 09:56:07
因为网上同时提供asp和php支持的空间很少提供mysql数据库,所以一直在找php直接连接文件型数据库的方法,比如access和sql anywehre

连接access见过使用adodb的,但是连接sybase sql anywhere的到现在还没有见到过,而且我不想使用adodb。

不知道有没有直接使用php连接access和sql anywhere的方法?请高人指点。
...全文
278 1 打赏 收藏 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
mynamesucks 2006-07-10
  • 打赏
  • 举报
回复
adodb也支持sybase sql anywhere的

include("$adodb_path/adodb.inc.php"); // includes the adodb library
$db = NewADOConnection('$database_type'); // A new connection
$db->Connect("$host", "$user", "$password", "$database_name");

以下是抄来的
现在你已经拥有一个数据库连接对象 $db 了。 你也可以使用 ADONewConnection 来替换 NewADOConnection —— 这两个是同一函数的不同的名字。 连接的数据库变量 $database_type 需要针对你的实际情况改成你所需要的。可以使用以下列表中的一个(括号内的为描述部分,不要在代码中使用):

access (Microsoft Access/Jet)
ado (Generic ADO, the base for all the other ADO drivers)
ado_access (Microsoft Access/Jet using ADO)
ado_mssql (Microsoft SQL Server using ADO)
db2 (DB2)
vfp (Microsoft Visual FoxPro)
fbsql (FrontBase)
ibase (Interbase 6 or before)
firebird (Firebird)
informix72 (Informix databases before Informix 7.3)
informix (Informix)
maxsql (MySQL with transaction support)
mssql (Microsoft SQL Server 7)
mssqlpo (Portable mssql driver)
mysql (MySQL without transaction support)
mysqlt (MySQL with transaction support, identical to maxmysql)
oci8 (Oracle 8/9)
oci805 (Oracle 8.0.5)
oci8po (Oracle 8/9 portable driver)
odbc (Generic ODBC, the base for all the other ODBC drivers)
odbc_mssql (MSSQL via ODBC)
odbc_oracle (Oracle via ODBC)
oracle (Oracle 7)
postgres (PostgreSQL)
postgres64 (PostgreSQL 6.4)
postgres7 (PostgreSQL 7, currently identical to postgres )
sqlanywhere (Sybase SQL Anywhere)
sybase (Sybase)

看这个地址
http://www.phpchina.cn/jiaocheng/html/middle/2006/0602/255.html

21,889

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧