就是调用路径C:\wamp\apache\htdocs\test\dll下的ocx文件里的函数,是怎么实现的啊?phpocx

解决方案 »

  1.   

    我是用com函数啊。。但是报错如下。。急啊
    Uncaught exception 'com_exception' with message 'Failed to create COM object `PhpOcx': 无效的语法 ' in C:\wamp\apache\htdocs\test\manageindex.php:4 Stack trace: #0 C:\wamp\apache\htdocs\test\manageindex.php(4): com->com('PhpOcx') #1 {main} thrown in C:\wamp\apache\htdocs\test\manageindex.php on line 4
      

  2.   

    贴出你的代码另外,所涉及的 com 应用必须是已注册的
      

  3.   

    <?php
      //include("C:/wamp/apache/htdocs/test/dll/PhpOcx.ocx");
      
      $mycom=new COM("PhpOcx.ocx") or die("Can't start word!");
      echo $mycom->phInitDecDis(350,300);
    ?>
    ocx文件我注册过  regsvr32 C:\wamp\apache\htdocs\test\dll\PhpOcx.ocxocx文件是用C++在VC上编写的。。
      

  4.   

    new COM("注册名.入口")你 regsvr32 C:\wamp\apache\htdocs\test\dll\PhpOcx.ocx 注册后
    PhpOcx 就是注册名而 PhpOcx.ocx 中可以有多个方法(至少有一个),你需要告知从哪个方法进入
    按习惯,主入口名与控件名相同所以你至少应写作
    $mycom = new COM("PhpOcx.PhpOcx");
      

  5.   

    还是不行啊。。报错如下Fatal error: Uncaught exception 'com_exception' with message 'Failed to create COM object `PhpOcx.PhpOcx': 无效的语法 ' in C:\wamp\apache\htdocs\test\manageindex.php:4 Stack trace: #0 C:\wamp\apache\htdocs\test\manageindex.php(4): com->com('PhpOcx.PhpOcx') #1 {main} thrown in C:\wamp\apache\htdocs\test\manageindex.php on line 4
    入口有没有是别的可能啊?