dpjtn48868 2014-06-10 23:38
浏览 47
已采纳

使用PHP连接到不同目录中的odbc数据源

I have a simple PHP script that connects to an Access .mdb like this:

$connection = odbc_connect('cmis008f','nousername','nopassword'); 

Both the cmis008f.mdb and the file.php are in the same directory /odbc; however, I want to move the file.php into the /PHP directory but cannot connect any longer, even if I do this:

$connection = odbc_connect('\cmis057s\odbc\cmis008f','nousername','nopassword'); 

I even flipped the slashes and tried that way... no luck. Any suggestions. /odbc and /PHP are both under the same directory /cmis057s.

Thanks

  • 写回答

1条回答 默认 最新

  • dtgta48604 2014-06-10 23:41
    关注

    Maybe try any or all of this:

    1. Use normal slash ( / )
    2. Try to use "../" (parent directory) instead of full path
    3. Check chmod (permissions) of directories
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题
  • ¥15 word样式右侧翻页键消失