<?php
$conn = new com("ADODB.Connection"); //提示错误:Fatal error: Class 'com' not found in /webhome/h173529/web/www/fun.php on line 2$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("database/database.mdb");
可是在本地就一切正常,,而且访问其他页面时,,都没有提示任何错误,,就是白色的一个页面,,这是为什么??
服务器配置信息:http://www.sinodiapc.com/pinfo.php
另:在页面中我是这样读取数据库的:
<?php
$i=0;
$rs = new com("ADODB.RecordSet");
$conn->Open($connstr);
$rs->Open("select top 5 * from productinfo order by productid desc",$conn,1,1);
while (!$rs->eof)
{
?>
<tr align=left valign=top>
<td width="65"><img src=images/pic1.jpg width=50 height=50><br>
</td>
<td width="174" class=STYLE2>
<b><?php echo substr($rs->Fields("productname"),0,10);?></b><br><img src=images/spacer.if width=1 height=4><br>
<?php
if ($rs->Fields("ProductDescription")!=NULL)
{
echo substr($rs->Fields("ProductDescription"),0,10);
}
else
{
echo("none");
}?>
本地都一切正常啊~~
$conn = new com("ADODB.Connection"); //提示错误:Fatal error: Class 'com' not found in /webhome/h173529/web/www/fun.php on line 2$connstr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("database/database.mdb");
可是在本地就一切正常,,而且访问其他页面时,,都没有提示任何错误,,就是白色的一个页面,,这是为什么??
服务器配置信息:http://www.sinodiapc.com/pinfo.php
另:在页面中我是这样读取数据库的:
<?php
$i=0;
$rs = new com("ADODB.RecordSet");
$conn->Open($connstr);
$rs->Open("select top 5 * from productinfo order by productid desc",$conn,1,1);
while (!$rs->eof)
{
?>
<tr align=left valign=top>
<td width="65"><img src=images/pic1.jpg width=50 height=50><br>
</td>
<td width="174" class=STYLE2>
<b><?php echo substr($rs->Fields("productname"),0,10);?></b><br><img src=images/spacer.if width=1 height=4><br>
<?php
if ($rs->Fields("ProductDescription")!=NULL)
{
echo substr($rs->Fields("ProductDescription"),0,10);
}
else
{
echo("none");
}?>
本地都一切正常啊~~
我要怎么办??找access驱动安装吗??可是那的网管不会给我装的~~
或者用sqlte也行,跟access差不多