开发者

Using curl with Phalanger

I'm trying to use the PHP Phalanger curl library php_curl.mng.dll in a .NET application. I set up my App.config as follows:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <phpNet>
    <classLibrary>
      <add assembly="php_curl.mng, Version=2.0.0.0, Culture=neutral, PublicKeyToken=4ef6ed87c53048a3" section="curl" />
    </classLibrary>
  </phpNet>
</configuration>

and am trying to call curl_init() in C#:

  PHP.Library.Curl.curl_init();

The code compiles with no errors bu开发者_Python百科t an exception gets fired when reaching the instruction:

  PHP.Core.PhpException: Call to undefined external function 'curl_init', extension 'php_curl' - check configuration.

Would someone know what I am missing?

Thank you,

Eric.


Actually I just found the solution in this thread http://phalanger.codeplex.com/discussions/1345

See the post by ladaprosek and the need to copy App.config to the target directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜