我用的代码是:dl("php_w32api.dll");
$api = new win32; 
$api->registerfunction("int Test(int a)   From   TestDll.dll"); 程序的结果是Loading of library failed: The specified module could not be found,就是说系统根本就没有找到我的TestDll.dll文件。此dll文件我是和php文件放在一起的,怎么会找不到呢,应该放在哪里?

解决方案 »

  1.   

    手册上说的很清楚啊
    -------------------------------
    The directory where the extension is loaded from depends on your platform: Windows - If not explicitly set in the php.ini, the extension is loaded from c:\php4\extensions\ by default. Unix - If not explicitly set in the php.ini, the default extension directory depends on whether PHP has been built with --enable-debug or not 
    whether PHP has been built with (experimental) ZTS (Zend Thread Safety) support or not 
    the current internal ZEND_MODULE_API_NO (Zend internal module API number, which is basically the date on which a major module API change happened, e.g. 20010901) ------------------------------------
    windows,如果是php4默认在extension文件夹中,php5默认在ext文件夹中
      

  2.   

    多谢楼上的回复!现在的问题是用的商业的虚拟主机,既看不到php.ini文件也看不到\hp4\extensions目录,怎么办?
      

  3.   

    写个phpinfo,看一下extension_dir的位置
      

  4.   

    extension的目录在C:\php\extensions,但是无法访问。