Convert PHP Class in apache module

前端 未结 2 965
感动是毒
感动是毒 2021-01-26 02:14

I have write a sophisticate system in php5 (many classes that use static method and include other files)

Now I want to distribuite that ant i would choose the module way

相关标签:
2条回答
  • 2021-01-26 02:51

    No, you cannot compile a PHP class into an Apache module. You may be able to rewrite it as a PHP extension, but that will effectively involve rebuilding your code from scratch in C -- you cannot simply convert PHP to an extension.

    You will probably have better luck using a PHP encoder (e.g, Ioncube or Zend Guard) for this task.

    0 讨论(0)
  • 2021-01-26 02:59

    Take a look at hiphop:

    • http://developers.facebook.com/blog/post/358/
    • https://github.com/facebook/hiphop-php/wiki/

    Developed at Facebook, and project / code hosted on Github. Will convert code into C++, it depends on what you are trying to achieve, if it is protecting you intellectual property I would agree with duskwuff, Ioncube or ZG.

    Worth noting is that once converted with hiphop, the result is not run as an Apache module but rather using a proprietary server also written at FB; well from what I have read so far.

    0 讨论(0)
提交回复
热议问题