开发者

Compile PHP to prevent "theft"?

开发者 https://www.devze.com 2023-04-12 12:01 出处:网络
If I create an application in java I compile it and it\'s hard to steal the code even if I send you the application. I know you can do it with reverse engineering and such but anyways.

If I create an application in java I compile it and it's hard to steal the code even if I send you the application. I know you can do it with reverse engineering and such but anyways.

If I create an application in PHP and put it on a clients server the client could copy paste the code if he or she wanted.

So my question is. Is there any convenient way to compile or somehow protect your PHP code from others even if it runs on their se开发者_运维百科rvers?


You could use IonCube to encode your files if you can afford it.

On the other hand, you could use APC to cache the bytecode and then set APC variable apc.stat to 0 and then remove your php files from the server. That way APC will always look in the cache without verifying that actual php files have changed.

You could also use HipHop to compile your code, but it's tricky to set up and more than often it doesn't compile without errors.


There is a PHP compiler produced by Facebook, called HipHop. See http://developers.facebook.com/blog/post/358 for more info.

However, the primary purpose of this compiler is to speed up your code, not to protect it. Compiling in itself is not a protection measure for any kind of code.

0

精彩评论

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