转换PHP类Apache模块中 [英] Convert PHP Class in apache module
问题描述
我写PHP5见过世面的系统(使用静态方法,包括其他文件很多类)
I have write a sophisticate system in php5 (many classes that use static method and include other files)
现在我想distribuite蚂蚁我会选择模块的方式,所以我想创建一个像myFramework.so一个模块,并将其包含在Apache中(也许)后,当我写一些PHP应用程序,我将使用方法和/或类。
Now I want to distribuite that ant i would choose the module way, so i like to create a module like myFramework.so and include it in Apache (maybe) and after, when i write some php app, I'll use method and/or classes.
现在我写
<?php
include("myFramework.php");
myClass::callMymethod();
?>
问题是我不会分享我的源$ C $ C,我不认为,code的困惑是更好的办法,所以,我preFER创建一个模块编译,但我不知道:
The problem is I won't to share my source code and i don't think that obfuscation of code is the better way, so, i prefer to create a module compiled but i don't know :
1 - 如果有可能
2 - 如果是,请问是什么方法
3 - 其他方式
1 - if is it possible 2 - if Yes, what is the ways 3 - other way
我whant做到这一点。
I whant to do that
<?php
myClass::callMymethod();
?>
和没有用autoinclude,我不会来保护我的code,我看到,如果我有卷曲模块或MySQL lib下,我可以使用的功能为,我怎么可以创建一个与我的框架?
and no use autoinclude, i wont to protect my code, i see that if I include curl module or mysql lib, I can use function for both, how I can create that with my framework?
推荐答案
没有,你不能编译PHP类到Apache模块。您可以重写它作为PHP扩展,但是这将有效地涉及用C从头开始重建你的code - 你不能简单地转换为PHP扩展
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.
您可能不得不使用PHP连接codeR(例如,Ioncube或Zend的卫队)完成这个任务更好的运气。
You will probably have better luck using a PHP encoder (e.g, Ioncube or Zend Guard) for this task.
这篇关于转换PHP类Apache模块中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!