我从以下代码中收到此错误:
$result = odbc_connect("DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;Database=$database_name",$database_username, $database_password);
警告:odbc_connect(): SQL 错误:[unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in SQLConnect in /dbconnect.php on line xx odbc not connected
我正在使用MySQL版本5.1.41-3ubuntu12.3
我的 phpinfo 给出以下输出:
Additional .ini files parsed /etc/php5/apache2/conf.d/odbc.ini, /etc/php5/apache2/conf.d/pdo_odbc.ini
odbc
----
ODBC Support enabled <br>