[請益] PHP調用DLL
因為不想再用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
PHP 近期熱門文章
PTT數位生活區 即時熱門文章