dongsu7049 2019-01-28 15:01
浏览 104

如何使用ODBC方法将PHP连接到DBF文件

I have an dbf file. I would like to use PHP to read data out of this dbf file using the ODBC connection method.

I am using xampp to test this.

I have set up the ODBC. Here is the ODBC connection.

odbc settings 1

odbc settings 2

<?php
$conn=odbc_connect('TestDBF','');
if (!$conn) {
    echo "Failed";
}
?>

This is the error I get:

PHP Error

The dbf file is saved on the desktop. How I can use PHP script to use ODBC connection to read data out of this file?*

  • 写回答

2条回答 默认 最新

  • dongluan0020 2019-01-28 15:19
    关注

    If I remember right php doesn't handle dbf out of the box and you need to install an extension or find a version that has been compiled with that capability. THis may have changed though as the last time I used it was in the php 5.x days.

    Also there are difference versions of dbf, so you need to make sure yours is compatible with whatever extesion/driver you are using.

    评论

报告相同问题?

悬赏问题

  • ¥20 求各位懂行的人,注册表能不能看到usb使用得具体信息,干了什么,传输了什么数据
  • ¥15 个人网站被恶意大量访问,怎么办
  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 Centos / PETGEM
  • ¥15 划分vlan后不通了
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大