你的那个php扩展加载文件肯定是编译错了,或者是代码错误了,没有正确加载到php

解决方案 »

  1.   

    6. 写代码.建个头,建个身体.
    Binzy.h
    view plaincopy to clipboardprint?   1. // Binzy Wu  
       2. // 2004-4-9  
       3. // PHP Extension  
       4.           
       5. #if HAVE_BINZY  
       6. extern zend_module_entry binzy_module_entry;  
       7. #define binzy_module_ptr &binzy_module_entry  
       8.   
       9. PHP_FUNCTION(hellobinzy); //  
      10. PHP_MINFO_FUNCTION(binzy); //  
      11. #endif  // Binzy Wu // 2004-4-9 // PHP Extension #if HAVE_BINZY extern zend_module_entry binzy_module_entry; #define binzy_module_ptr &binzy_module_entry PHP_FUNCTION(hellobinzy); // PHP_MINFO_FUNCTION(binzy); // #endif
    Binzy.c
    view plaincopy to clipboardprint?   1. // Binzy Wu  
       2. // 2004-4-9  
       3. // PHP Extension  
       4.   
       5. #include "php.h"   
       6. #include "Binzy.h"   
       7.   
       8.   
       9. #if HAVE_BINZY  
      10.   
      11.         #if COMPILE_DL_BINZY   
      12.         ZEND_GET_MODULE(binzy)  
      13.         #endif  
      14.   
      15.         function_entry binzy_functions[] = {  
      16.                 PHP_FE(hellobinzy, NULL)  
      17.                 {NULL, NULL, NULL}  
      18.         };  
      19.   
      20.         zend_module_entry binzy_module_entry = {  
      21.                 STANDARD_MODULE_HEADER,  
      22.                 "binzy", binzy_functions, NULL, NULL, NULL, NULL, PHP_MINFO(binzy), NO_VERSION_YET, STANDARD_MODULE_PROPERTIES  
      23.         };  
      24.   
      25.         PHP_MINFO_FUNCTION(binzy)   
      26.         {   
      27.                  php_info_print_table_start();   
      28.                  php_info_print_table_row(2, "Binzy Extension", "Enable");   
      29.                  php_info_print_table_end();   
      30.         }   
      31.   
      32.         PHP_FUNCTION(hellobinzy)  
      33.         {   
      34.                 zend_printf("Hello Binzy");   
      35.         }   
      36.   
      37. #endif  6. 编译...修改php.ini, restart apache, 写个phpview plaincopy to clipboardprint?   1. <?  
       2. hellobinzy();  
       3. ?>  
    我是按上面做的
      

  2.   

    用 regsvr32 加载dll 说已加载,但没有找到dllRegisterserver输入点
    无法注册这个文件
      

  3.   


    呵呵,所以说开始选择什么dll类型很重要.
    在php.ini里加上以后,copy它到system32目录,
    重启,
    phpinfo里看有没有你加载的模块.
      

  4.   

    - -
    编译通过了
    加到ext里,php.ini里也加好了
    但是还是
    Unable to initialize module Module compiled with module API=20020429, debug=0, thread-safety=1 PHP compiled with module API=20040412, debug=0, thread-safety=1 These options need to match in Unknown on line 0我只改php5ts.lib ,原作php4ts.lib