当前位置:首页 » 多媒体相关

使用com出错问题!?


我的操作系统win2000,我用的是php5   ini文件配置如下:  
  [com]  
  ;   path   to   a   file   containing   guids,   iids   or   filenames   of   files   with   typelibs  
  ;com.typelib_file   =    
  ;   allow   distributed-com   calls  
  com.allow_dcom   =   true  
  ;   autoregister   constants   of   a   components   typlib   on   com_load()  
  ;com.autoregister_typelib   =   true  
  ;   register   constants   casesensitive  
  ;com.autoregister_casesensitive   =   false  
  ;   show   warnings   on   duplicate   constat   registrations  
  ;com.autoregister_verbose   =   true  
   
   
  我执行下列代码,出现错误:fatal   error:   class   com   not   found   in   d:\php_work\php_web\loginon.php   on   line   2,各位大侠,怎么解决!?  
  代码如下:  
  <?php  
  $conn   =   new   com("adodb.connection");  
  $connstr   =   "driver={microsoft   access   driver   (*.mdb)};   dbq="   .   realpath("netbook.mdb");  
  $conn->open($connstr);  
  $rs   =   new   com("adodb.recordset");  
  $rs->open("select   *   from   data",$conn,1,1);  
  echo   $rs->count;  
  while(!   $rs->eof)   {  
  //     $f   =   $rs->fields(0);   //   这里注释掉的是另一种字段访问方式  
  //     echo   $f->value;  
  echo   $rs->fields["content"]->value."<br/>";  
      $rs->movenext();  
  }  
  ?>  
 

.

推荐阅读

  • 人性化界面灵图天行者5地图售650元GPS地图软件及方案 [详细内容]
  • 手机充值卡和缴费卡选购技巧 [详细内容]
  • 6270的郁闷之处 [详细内容]
  • 低价也有好货 入门级车载GPS全推荐爱国者 GPS导航王 GP-P370GPS [详细内容]
  • VB6.0初学者的10个编程小技巧 [详细内容]
  • V3不能与电脑连接的问题解决 [详细内容]
  • 不浪费一分钱 能看电影的GPS导航仪超视能 Maxian T700 GPS [详细内容]
  • 网友回答:

    讨论区

    Login