Xampp php_pdo_odbc 不工作 [英] Xampp php_pdo_odbc not working

查看:43
本文介绍了Xampp php_pdo_odbc 不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Xampp linux 版本:7.1操作系统:Ubuntu 14.04

Xampp linux version: 7.1 OS: Ubuntu 14.04

我已经在 opt/lampp/etc/php.ini 中取消了 extensions=php_pdo_odbc.dll 的注释

I already uncommented extensions=php_pdo_odbc.dll in opt/lampp/etc/php.ini

但是 odbc 没有显示

but odbc is not showing

图片在这里

推荐答案

你使用的是 linux,所以忘记 .dll windows 扩展名:

you are using linux, so forget about .dll windows extension :

首先你需要检查你是否有扩展名:

first you will need to check if you have the extension or not :

print_r(PDO::getAvailableDrivers());

这将使用当前安装的 PDO 驱动程序打印一个数组,

this will print an array with the currently installed PDO Drivers,

如果您没有获得 odbc 驱动程序,请尝试启用它:

if you didn't get the odbc driver , try to enable it :

sudo phpenmod pdo_odbc

然后再次检查,如果没有安装,您将需要安装它:

then check again, if not installed you will need to install it :

apt-get install php7.0-odbc

这篇关于Xampp php_pdo_odbc 不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆