在本地测试没问题,上传到空间就不行了,可以插入数据,就是读不出来数据,
odbc_fetch_array() 和 odbc_fetch_row() 都返回false, 哪有问题呢?
以下是php代码
<?php
$database = "dbd.mdb";
$connstr="DRIVER=Microsoft Access Driver (*.mdb);DBQ=".realpath($database);
$conn=odbc_connect($connstr,"","",SQL_CUR_USE_ODBC );
$sql = "SELECt * FROM member ORDER BY id desc";
$result = odbc_exec( $conn , $sql );
//var_dump(odbc_fetch_array($result)); 上传到虚拟主机后就会返回false
$allitems = array();
while(false != ($rs = odbc_fetch_array($result))) {
$allitems[] = $rs;
}
var_dump($allitems);
?>