作者blackbing (blackbing)
看板PHP
标题[请益] PHP调用DLL
时间Thu May 24 19:01:15 2007
因为不想再用PHP写一次CODE
想包成DLL给PHP呼叫,
但是一连串的问题却接踵而来
首先是PHP5已经不支援dl()这个函式
会出现
Not supported in multithreaded Web servers - use extension=
in your php.ini
GOOGLE一下继续找到w32api这个函式,并且也找到蛮多的范例
问题是...PHP的官方网页
http://php.isu.edu.tw/manual/en/ref.w32api.php
有个Note:
This extension has been moved to the PECL repository and is
no longer bundled with PHP as of PHP 5.1.0.
继续追到PECLhttp://pecl.php.net/
并且也找到扩充的dll档,叫做「
php_ffi.dll」
http://pecl4win.php.net/ext.php/php_ffi.dll
很兴奋的也在php.ini里头引入了,
重新执行apache.....
出现
「
Module compiled with module API=20041030, debug=0, thread-safety=1
PHP compiled with module API=20050922, debug=0, thread-safety=1
These options need to match
」
天阿....调用个DLL有这麽困难重重吗
寻线找到作者的BLOG
http://zlog.thebrainroom.net/index.php?/archives/20_ffi_is_here.html
给大家参考
我的PHP版本是5.1.1
不知道有没有大大有试过用PHP CALL DLL成功过的
感谢大家!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.127.22.18